{project_description}
Branches: main, dev, feature/${jira_prefix}-1, bugfix/${jira_prefix}-1. Commit name structure: [{jira_prefix}-1] Description Merge request should contain no more than 40 files
Clean Architecture + BloC Dependency Injection: GetIt Domain layer: models, repositories, use-cases. Data layer: entities, mappers from entities to domain model, implementations of repositories and providers. Presentation layer: screens + bloc
- Dev
- Prod
- Stage
Modules: core, core_ui, navigation, data, domain, etc. For presentation layer every feature is a separate module.
Lint rules described in analysis_options.yaml pre-commit hook should be configured:
- Create file pre-commit (without extension) with content:
#!/bin/sh
dart format --line-length=100 --set-exit-if-changed core core_ui data domain features lib navigation
flutter analyze
- Place it in .git/hooks directory of the project.
- File should have permission to be executed.
Flutter Async
Providers are responsible for specific services (e.g. http provider, local provider, etc.), they use data layer entities. Do not have abstract base classes. Repositories are responsible for gathering data from providers and mapping it to the corresponding domain layer models. Have abstract base classes in domain layer.
Base and frequently used widgets are stored in core_ui module. Base widget for screens is AppScaffold. Example: CustomScreen -> CustomForm Navigation is implemented using Auto Route Navigation on BLoC event is done from the BLoC object itself without BuildContext, router is stored in DI container and is injected in BLoC via constructor.
Not implemented yet.
Not implemented yet.
One file = one widget. Screen widget contains BlocProviders.
Localization is implemented using EasyLocalization service.
Fonts, colors, frequently used constant values, and icons are stored in core_ui module.
Mobiles - iOS and Android
- Install Flutter
- Install Android Studio
- Install XCode (only for MacOS)
- Install CocoaPods (only for MacOS)
- Install Flutter and Dart plugins for Android Studio
- Install XCode command line tools
- Run
flutter doctorand fix all issues - Run
prebuild_script.shto generate files for code generation - Run project by
flutter runcommand
Run this command in terminal for each flavor:
flutterfire config
--project=${project-name}
--out=core/lib/config/firebase/firebase_options.dart
--android-app-id=com.enigma.liquid_2.${env}
--ios-bundle-id=com.enigma.liquid2.${env}