Flavor
Set up 3 environments (dev, staging, production) for mobile in Flutter (3 separate mobile apps)

Android: Set up 3 environments
Step 1: Declare environments in android/app/build.gradle
android/app/build.gradleStep 2: Split google-services.json by flavor
google-services.json by flavorStep 3: Run Android app by flavor
Method 1: Run from terminal
FVMMakeMethod 2: Run with Configuration in Android Studio

iOS: Set up 3 environments
Step 1: Create Configurations
Step 2: Update ios/Podfile
ios/PodfileStep 3: Create schemes by environment
Step 4: Create Firebase config files by environment
Step 5: Add Build Phase Select Firebase Plist
Select Firebase PlistStep 6: Remove static plist from Resources
Step 7: GOOGLE_REVERSED_CLIENT_ID by environment
GOOGLE_REVERSED_CLIENT_ID by environmentStep 8: Change App Name by flavor
Run app by flavor (iOS/Android)
Method 1: Run debug from terminal
Method 2: Run via IDE / Xcode

Run app by Build flavor in IDE
Conclusion

Last updated