Files
h7x4 6104f8afc6 Merge branch '62-write-tests-for-flutter' into 'master'
Squashed commit of the following:

commit 9ae08c705115e73e5a426f4d1f164f62eda412a1
Merge: 08e3315 4597204
Author: Øystein Kristoffer Tveit <h7x4abk3g@protonmail.com>
Date:   Sun Nov 28 22:29:56 2021 +0000

    Merge branch 'master' into '62-write-tests-for-flutter'

commit 08e33152d22ca37bb12c95023991ba450ae99dd1
Author: h7x4 <h7x4abk3g@protonmail.com>
Date:   Sun Nov 28 23:07:27 2021 +0100

    Rename some tests

commit 68dbc46a297fb644bd48ee4a1a78bbc4b366f0c2
Author: h7x4 <h7x4abk3g@protonmail.com>
Date:   Sun Nov 28 23:06:53 2021 +0100

    Add tests for connection_page
2021-11-28 23:51:02 +01:00
..
2021-11-25 15:25:21 +01:00
2021-11-25 15:25:21 +01:00
2021-11-25 15:25:21 +01:00
2021-11-25 15:25:21 +01:00
2021-11-25 15:25:21 +01:00
2021-11-28 23:41:21 +01:00
2021-11-28 23:41:21 +01:00

Client coverage Client page Download APK

Flashy Client

A phone client for the Flashy program

Flashy client while memorizing Flashy client while editing cards

This project was built with Flutter

Getting Started

In order to launch this app, you will first need to have flutter installed. This also includes the Android SDK and potentially a Android Emulator if you don't own an android phone. These are usually installed through installing Android Studio (Windows).

Although not tested, this app might also work on IOS-devices provided you own a device running macOS.

After you have gotten your android device connected to adb (check by running adb devices), you can launch the application by executing:

$ flutter pub get
$ flutter run

Running in Gitpod

Gitpod will automatically take care of installing the flutter framework and any dependencies. However, gitpod does not properly support [running android emulators at this point in time][gitpod-android]. Therefore, the app will only be able to run in the web browser.

In order start the system, first switch to the terminal called 1: bash, and execute the following commands

$ java -jar target/flashy.jar --server

Then switch over to the terminal called 2: flashy_client: bash, and execute:

$ run-client

Note: it might take some time the second terminal to load. Just wait until you get a prompt

This will open a new tab in the browser. If if doesn't, you can manually open a new tab and go to the link in the terminal output to open the app.

Open link in terminal

Because this app was made for a phone layout, the website will look a little bit stretched.

Usage

Start up a flashy rest server on an ip and a port you know is accessible to the device running the client. One of the easiest ways to do this if your network is locked down, might be to start a WiFi hotspot on your phone, and connecting the computer running the server to the hotspot. Then do the following:

  • Open the app
  • Go to the connection tab
  • Fill in the IP (or hostname) and port of the server
  • Click reconnect
  • Switch back to the Memorize tab. You're now connected to the server!

Debugging

Could not <...>. Are you connected properly?

  • Have you typed the right ip and port into the app?
  • Check if there's a firewall inbetween the app and the server
  • The server might not have created the first default card deck properly. Try adding some cards in the second pane and see if the error resolves.

Development tools

To lint the project, use the builtin vscode linting or execute:

$ flutter analyze .

To generate apidocs, execute:

$ flutter pub global activate dartdoc
$ dartdoc

To regenerate the splashscreen and/or app icon, execute:

$ flutter pub run flutter_launcher_icons:main
$ flutter pub run flutter_native_splash:create