When I run flutter run --flavor dev -t lib/main_dev.dart, I still have the data from my Firebase "prod" project instead of "dev".
- With Android Studio, I have created two configurations :
- main_dev.dart with dev build flavor
- main_prod.dart with prod build flavor
build.gradle :
flavorDimensions "default" productFlavors { dev { dimension "default" applicationIdSuffix ".dev" } prod { dimension "default" } }
Distinct google-services.json file in two different folders :
- app/src/dev
- app/src/prod
- Distinct firebase_options.dart in two different folders :
- lib/dev
- lib/firebase/prod
- Flutter clean
The link of firebase_options.dart was the one from prod instead of dev in main_dev.dart.