Multi-flavor support: development, staging, production Platform compatibility: Android & iOS Clean Architecture structure
Create an .env file in the root directory for each environment by referring to the provided example here. Ensure that you generate the necessary environment variables as specified in the example to enable the usage of all available configurations as listed below.
- .env.development
- .env.production
- .env.staging
flutter pub get
dart run build_runner build --delete-conflicting-outputs
Or run the following command to install dependencies and generate codes
make fresh
The application consists of 3 different variations, and you can utilize the subsequent commands to execute each distinct variation.
- 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
*project works on iOS and Android.
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
โ
โโโ feature
| โโโ data
โ โ โโโ data source
โ โ โโโ model
โ โ โโโ repository(implementation)
โ โโโ domain
โ โ โโโ entities
โ โ โโโ repository(abstract)
โ โ โโโ use cases
โ โโโ presentation
โ โ โโโ bloc/cubit
โ โ โโโ pages
โ โ โโโ widgets
โ โ
https://www.loom.com/share/cd87e95a0c1043c297581d4bd911264b?sid=58f4c413-ac5e-4fc5-b7a7-4c65aaae8eb1
The apk file can be found here