Concordium's reference wallet for mobile and web, written in Flutter.
The JSON models used to deserialize the responses from Wallet Proxy are generated using
json_serializable
.
It works by specifying the data model as plain Dart classes
along with a little special syntax for the fromJson
and toJson
methods.
When running the command
dart run build_runner build
the library will expand this syntax into appropriate implementations of these methods
in a new file declared with the part
directive.
See for example wallet_proxy/model.dart
which expands into wallet_proxy/model.g.dart
.
The generated class is checked into the repo, but imports always refer to the original one.
For unit / widget tests, run:
flutter test
For integration tests on android or ios, make sure you have the test device connected and run:
flutter test integration_test
To run integration tests for web, you must install chromedriver, and run it in a separate terminal:
chromedriver --port=4444
And then run the script:
./integration_test/run_tests.sh
If the HEADER environment variable is set, the tests run with a header.
To run a specific test file, examplified here with test_file_name
, run::
flutter drive --driver=integration_test/test_driver.dart --target=integration_test/test_file_name.dart -d web-server
You can replace -d web-server
with -d chrome
for the test to not run headless.
To see the allowed licenses, check out scripts/license.yaml
.
To get a (readable) list of the licenses of dependencies run:
dart run license_checker check-licenses --config scripts/license.yaml