Back to feed
Dev.to
Dev.to
5/13/2026
Separating dev and production environment in your Flutter App with multiple Firebase configurations.

Separating dev and production environment in your Flutter App with multiple Firebase configurations.

Short summary

Use Flutter Flavors to create distinct dev and production app variants from a single codebase, each connected to its own Firebase project. Configure flavor-specific Firebase credentials in build.gradle for Android and Xcode schemes for iOS, then set up separate Dart entry points that initialize the correct Firebase options. This eliminates test-data pollution, prevents debug notifications from hitting production users, and lets you test both versions on one device.

  • Use Flutter Flavors with separate Firebase projects for dev and production environments
  • Configure flavor-specific credentials in Android Gradle and iOS Xcode schemes
  • Prevents test data pollution and accidental production notifications

Generated with AI, which can make mistakes.

Is this a good recommendation for you?

Explore more