A new Flutter project.
This project is a starting point for a Flutter application.
A few resources to get you started if this is your first Flutter project:
For help getting started with Flutter development, view the online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.
if you have any environment variable, you should add it to config.json
Run:
$ fvm flutter pub run build_runner build --delete-conflicting-outputs
View document for details
Run:
$ fvm flutter pub run easy_localization:generate -S assets/locales
$ fvm flutter pub run easy_localization:generate -S assets/locales -f keys -o locale_keys.g.dart
View document for details
Run:
$ fvm flutter pub run flutter_flavorizr
If you encounter the issue about "tmp script sh" when generate firebase service. You must run:
$ fvm flutter pub run flutter_flavorizr -p assets:download,assets:extract,google:firebase,assets:clean
Install Flutter Gen
$ dart pub global activate flutter_gen
Or add it as a part of build_runner
dev_dependencies:
build_runner:
flutter_gen_runner:
Run Flutter Gen With command line
$ fluttergen -c pubspec.yaml
With build_runner
$ fvm flutter pub run build_runner build
View document for details
Active from https://pub.dev
$ dart pub global activate mason_cli
Or install from https://brew.sh
$ brew tap felangel/mason
$ brew install mason
Get all bricks registered in mason.yaml run:
$ mason get
Then you can use 'mason make' to generate bricks. Suppose you want to generate a module with bloc, you should run
$ mason make bloc_module -o lib/modules
- fvm flutter build apk --release --flavor <envname> -t lib/main<env_name>.dart
Example: Build STAGING
fvm flutter build apk --release --flavor staging -t lib/main_staging.dart
fvm flutter build appbundle --flavor staging -t lib/main_stating.dart