The simple app gets the link or encodes the link on the comment.
- Router with Go Router
- Linting style with Effective Dart
- Dependency Injection with injectable and get_it
- Testing with mockito and bloc_test
-
Check if you are in the beta channel of flutter SDK and the version v2.17.0 or higher. Instruction to change flutter channel.
-
Clone the repo
git clone https://github.com/viviethoang99/convert_link.git
-
And then we can use the normal build and run procedure
flutter pub get flutter run
-
Some files like
*.freezed.dart
,*.g.dart
,*.iconfig.dart
are auto generated. If there is any issue from these files just run this command to regenerate them.flutter pub run build_runner watch --delete-conflicting-outputs
This project contains 3 flavors:
- development
- staging
- production
To run the desired flavor either use the launch configuration in VSCode/Android Studio or use the following commands:
# Development
$ flutter run --flavor development --target lib/main_development.dart
# Staging
$ flutter run --flavor staging --target lib/main_staging.dart
# Production
$ flutter run --flavor production --target lib/main_production.dart
*Convert Link works on iOS, Android, Web, and Windows.
To run all unit and widget tests use the following command:
flutter test --coverage --test-randomize-ordering-seed random
To view the generated coverage report you can use lcov.
# Generate Coverage Report
$ genhtml coverage/lcov.info -o coverage/
# Open Coverage Report
$ open coverage/index.html