๐Ÿš€ Simplifying Multi-Environment Firebase Configurations with FlutterFire CLI

Nabraj KhadkaNabraj Khadka
1 min read

Did you know? The FlutterFire CLI natively supports multiple flavors/environments! ๐ŸŒŸ

Hereโ€™s how to set it up for different Firebase environments:

# For the [DEV] environment

flutterfire config \
  --out=lib/firebase_options_dev.dart \
  --ios-bundle-id=com.nabrajkhadka.dev \
  --macos-bundle-id=com.nabrajkhadka.dev \
  --android-app-id=com.nabrajkhadka.dev

# For the [PROD] environment
flutterfire config \
  --out=lib/firebase_options.dart \
  --ios-bundle-id=com.nabrajkhadka.com \
  --macos-bundle-id=com.nabrajkhadka.com \
  --android-app-id=com.nabrajkhadka.com

Manage different environments effortlessly and enhance your development workflow. ๐Ÿ”ง

#Flutter #Firebase #FlutterFire #MobileDevelopment #DevTips #Coding

0
Subscribe to my newsletter

Read articles from Nabraj Khadka directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Nabraj Khadka
Nabraj Khadka

Experienced Flutter developer with 5+ years' expertise. Skilled in app creation, state management (e.g., Riverpod, Bloc, Getx), Firebase, Git, and project management. Proficient in layout design, APIs, firebase, cloud services, payment gateways Android SDK and bit of SwiftUI. Also versed in Java, Swift, Kotlin and PHP.