Ontari platform
Run:
npm install -g firebase-tools
dart pub global activate flutterfire_cli
flutterfire configure
# Dev environment
flutterfire config \
--project=ontari-mobile-eb78f \
--out=lib/firebase_options_dev.dart \
--ios-bundle-id=com.dev.ontari \
--android-app-id=com.dev.ontari
# Product environment
flutterfire config \
--project=ontari-mobile-eb78f \
--out=lib/firebase_options_prod.dart \
--ios-bundle-id=com.prod.ontari \
--android-app-id=com.prod.ontari
Run:
$ flutter packages pub run build_runner build --delete-conflicting-outputs
Run:
$ flutter pub run easy_localization:generate -S assets/locales -f keys -O lib/generated -o locale_keys.g.dart
View document for details
Run:
$ fvm flutter pub run flutter_flavorizr
flutter pub get &&
flutter pub run flutter_native_splash:create &&
flutter pub run flutter_launcher_icons
If using FVM, in all command need to add "fvm" before the old command
$ fvm flutter pub get
fvm flutter build apk --release --flavor <env_name> -t lib/main_<env_name>.dart
fvm flutter build ipa --release --flavor <env_name> -t lib/main_<env_name>.dart
Example: Build Dev
fvm flutter build apk --release --flavor dev -t lib/main_dev.dart
fvm flutter build ipa --release --flavor dev -t lib/main_dev.dart
fvm flutter build web --web-renderer html --release -t lib/main_dev.dart