Used patters:
- BLoC.
- Clean Architecture Layers (feature first approach).
- Multi Packages (bootstrap - core - design - network) using Melos (Mono Repo).
Project structure highly inspire by VGV: https://verygood.ventures/blog/very-good-flutter-architecture?utm_source=linkedin&utm_medium=social&utm_campaign=app_architecture
Lint rules from Flutter Linter
├─ lib
│ ├─ app
│ │ ├─ most_popular
│ │ │ ├─ application
│ │ │ ├─ data
│ │ │ ├─ domain
│ │ │ └─ presentation
│ │ └─ router
│ ├─ app.dart
│ ├─ common
│ ├─ locator
│ ├─ main.dart
│ └─ providers.dart
├─ melos.yaml
├─ packages
│ ├─ bootstrap
│ ├─ core
│ ├─ design
│ └─ network
├─ pubspec.yaml
├─ report.json // test report will saved here
└─ test
├─ most_popular_bloc_test.dart
└─ most_popular_remote_test.dart
- Flutter BLoC for State Management.
- Go Router (Routing package use nav 2.0).
- Get It (Service Locater and Dependencies container).
- Dio (Http Client).
- BLoC Test.
- Http Mock Adapter for testing.
scripts:
analyze:
run: melos exec -- flutter analyze .
description: Run `dart analyze` in all packages.
format: melos exec -- "flutter format ."
fix_hints: melos exec -- "dart fix —apply ."
flutter_test_report: flutter test --reporter json | tojunit --output report.json
flutter_test: flutter test
build_runner:
run: |
melos exec --depends-on="build_runner" -- $runner
env:
runner: flutter pub run build_runner build --delete-conflicting-outputs
build_relese:
run: flutter build apk
ex: melos format .
- Test report will saved in report.json file.
- You can find all scripts and run them from android studio or VS Code in melos.yaml file.
- Run this before run any melos script
dart pub global activate melos
if melos is note active. - Run this before run report test script
dart pub global activate junitreport
if junitreport is note active.