AfyaMoja
Project prerequisites
-
The AfyaMoja app runs on Flutter version 2.2.3 stable channel. To check the flutter version and channel installed in your machine run
flutter --version
. -
To switch from another channel of Flutter to the stable channel run
flutter channel stable
. -
To install Flutter version 2.2.3 run
flutter version v2.2.3
.
Looks like we are done with the prerequisites :-)
How to setup and run AfyaMoja
- Clone the project by running
git clone https://github.com/savannahghi/AfyaMoja.git
or download the code cd AfyaMoja
- Run
flutter pub get
- You can now run the app on an attached device or emulator
How to setup and run unit, widget and integration tests locally
Unit Tests
To run unit and widget tests, you will require to install lcov
by running sudo apt-get install lcov
in the terminal. Finally, run the following commands in the terminal:
-
From the root folder, run
flutter test --coverage test/
-
Run
genhtml -o coverage coverage/lcov.info
-
To view the coverage, open the html file generated at
coverage/index.html
with your preferred browser.
Integration tests
To run integration tests, ensure that you have an emulator running. See instructions on how to run an emulator.
- Then run
flutter drive --target=test_driver/app.dart
Dart & Flutter Version
- Dart 2: >= 2.12
- Flutter: >=2.2.3
Developing & Contributing
First off, thanks for taking the time to contribute!
Be sure to check out detailed instructions on how to contribute to this project here and go through out Code of Conduct.
GPG Signing: As a contributor, you need to sign your commits. For more details check here
License
This library is distributed under the MIT license found in the LICENSE file.