Flutter Flavoring — Android project using Firestore.

defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.yogita.add_flutter_app_to_firebase"
minSdkVersion 21
multiDexEnabled true
targetSdkVersion 28
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
}

flavorDimensions "app"
productFlavors {
development {
dimension "app"
applicationIdSuffix ".dev"
}
staging {
dimension "app"
applicationIdSuffix ".staging"
}
production {
dimension "app"
applicationIdSuffix ""
}
}


buildTypes {
release {
In firebase project FlutterAppToFirebase — Dev, I have added “com.yogita.add_flutter_app_to_firebase.dev” as package name (repeat same for staging)
for production applicationIdSuffix null so it take default package name “com.yogita.add_flutter_app_to_firebase”
projects for dev/staging/prod
screen shot to show .dev package name and .json file
android
- app
- src
- development
- google-services.json
- production
- google-services.json
- staging
- google-services.json
flutter run --flavor <flavor-name>

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Yogita Kumar

Yogita Kumar

311 Followers

Google Developer Expert Flutter| Cloud Enthusiast | Full Stack Developer | .NET Developer |Coach and Trainer