Before running the below command install firebase cli and flutterfire.
-
Dev
flutterfire configure --platforms=android --android-package-name=com.example.splittr.dev --android-out=android/app/src/dev/google-services.json --out=lib/core/firebase/firebase_options_dev.dart
-
Prod
flutterfire configure --platforms=android --android-package-name=com.example.splittr --android-out=android/app/src/prod/google-services.json --out=lib/core/firebase/firebase_options_prod.dart
dart run build_runner build --delete-conflicting-outputs
For Android Studio: If DEV and PROD are not visible do the following:
- Go to edit configuration.
- Add name - DEV or PROD.
- Add dart entry point as
main_dev.dart
for DEV andmain_prod.dart
for PROD. - In build flavor section - dev for DEV and prod for PROD.
For VS Code:
- There is a launch.json file for it.
- You mfs can select the DEV or PROD there.
- Activate mason
dart pub global activate mason_cli
- Go to mason folder
cd mason
- Get mason bricks
mason get
mason make feature_page -o ../lib/features/ --on-conflict overwrite --feature_name [yourFeatureName]
mason make feature_component -o ../lib/features/ --on-conflict overwrite --feature_name [yourFeatureName]
flutter pub cache clean
flutter pub cache repair
flutter clean