For this project to work correctly lefthook
and commitlint
must be installed in
your computer. We use lefthook to run git hooks and commitlint to lint commit messages.
# installs lefthook
brew install lefthook
# add needed hooks
lefthook install
# install commitlint
# node needed in system
npm install -g @commitlint/cli @commitlint/config-conventional
For more info:
This project is a starting point for a Flutter application with the following features:
- Clean Architecture
- Flavors (beta, live)
- Firebase integration (Notifications, Social Auth)
- REST (Dio)
- Native launch screen
- App icons configured
- Routing (Go Router)
- State management with Bloc
- DotEnv (for env variables on native code)
The following index has a summary of configuration, common errors and how to solve them for each of the features this base project has:
For create unions type use this extension from vscode
- Dart Union Class Generator
- Edit pubspec.yaml for flavors.
- Replace Firebase's files in .firebase
- Run "flutter pub run flutter_flavorizr"
- Restore files app.dart and main.dart and app/flavorizr.gradle.kts
- Run "dart run flutter_launcher_icons -f flutter_launcher_icons-beta.yaml"
- Run "dart run flutter_launcher_icons -f flutter_launcher_icons-live.yaml"
- Replace package name in fastlane (android and ios)
- Replace values in IOS-Build Settings to "DYNAMIC_LINKS_URL_TYPE_SCHEMA", "DYNAMIC_LINK_HOST" and "FIREBASE_REVERSED_CLIENT_ID"
- Replace values in .env.beta and .env.live
- Ready to start, run "just setup".
- Add assets in folder assets.
- Run "just generate_assets_app_files".
flutter test --coverage genhtml coverage/lcov.info -o coverage/html open coverage/html/index.html