This is a scaffold project, designed to kickstart Flutter mobile app development.
Supports two platforms:
- iOS
- Android
Initially generated by the Very Good CLI 🤖
Heavily modified to accostomed to personal practice 👨🏻💻
This project provides:
- Multi-flavor app for both iOS and Android
- API client generation according to endpoints
- JWT Token support
- State management with BLoC
- Localization (i18n)
- App icon generation
- App splash screen generation
- Navigation dependent on Auth state changes
- Provided LoginPage and HomePage that are ready to be used
Minimum Targeting Versions:
- Android: 21
- iOS: 12.0
Thoughtout the projects, there are multiple TODO
s to guide you through stuff that requires manual configurations.
Also, for iOS specific settings, there are some steps that requires you to perform in XCode for best compatibility:
- Update bundle identifiers under each configurations
- Update
$(FLAVOR_APP_NAME)
under "Build Settings"
This project contains 2 flavors:
- dev
- prod
To run the desired flavor either use the launch configuration in VSCode or use the following commands:
# Dev
$ flutter run --flavor dev --target lib/main_dev.dart
# Prod
$ flutter run --flavor prod --target lib/main_prod.dart
This project uses flutter_launcher_icons to facilitate generation of app icons.
To update app icons:
- Edit
flutter_icons
configurations underpubspec.yaml
and update icon files underassets/icons
- Run:
$ flutter pub run flutter_launcher_icons:main
This project uses flutter_native_splash to facilitate generation of native splash screens.
To update app icons:
- Edit
flutter_native_splash.yaml
for splash screen configurations and update icon files underassets/icons
- Run:
$ flutter pub run flutter_native_splash:create
This project relies on slang for localizations.
Presumably, you should manage translations within the app with other stakeholders via a spreadsheet, with string for each row, and locale for each column.
After that:
- Generate a
.csv
file and updatelib/i18n/translations.i18n.csv
- Run:
$ flutter pub run slang
You can update configuration of slang under slang.yaml
This project relies on auto_route for routing control and navigation with parameters.
- Define your routes in
lib/core/navigation/app_router.dart
- Run:
$ flutter pub run build_runner build
This project recommends the usage of freezed for generating consistent data-classes that support union, cloning equality and much more.
After defining your Freezed
class, run:
$ flutter pub run build_runner build
This projects uses Dio as the http client, and Retrofit for API route handling and generation.
Again, after defining your API routes under lib/core/api
, run:
$ flutter pub run build_runner build