Before running the below command install firebase cli and flutterfire.
-
Dev
-
flutterfire configure --platforms=android --android-package-name=com.example.splittr.dev --out=lib/core/firebase/firebase_options_dev.dart
- (IMP) Create a dev folder inside android/app/src/ and move the
google-services.json
file to dev folder.
-
-
Prod
-
flutterfire configure --platforms=android --android-package-name=com.example.splittr --out=lib/core/firebase/firebase_options_prod.dart
- (IMP) Create a prod folder inside android/app/src/ and move the
google-services.json
file to prod folder.
-
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]