Emily Rodriguez
November 2025
17 minute read

Building a modern mobile app without Firebase is like cooking without fire. Flutter Firebase integration gives you instant backend power: real-time databases, secure authentication, cloud functions, and analytics—all with minimal setup.
In this step-by-step tutorial, you'll learn how to integrate Firebase Authentication (email/password, Google Sign-In) and Cloud Firestore into a Flutter app. We’ll build a fully functional user profile system with secure data storage, real-time updates, and offline persistence. Perfect for beginners and intermediate developers aiming to ship production-ready apps.
Google’s Firebase is the de facto backend for Flutter apps. Over 70% of Flutter apps on the Play Store use Firebase (2024 State of Flutter report).
Zero server management
Real-time data sync with Cloud Firestore
Secure Firebase Authentication (OAuth, anonymous, phone)
Scales automatically
Official firebase_flutter SDK with first-class support
Free tier generous for MVPs
Go to Firebase Console, click Add project, and name it flutter-firestore-demo.
Register your app bundle ID (com.example.flutterfire) for both platforms. Download google-services.json (Android) and GoogleService-Info.plist (iOS).
Place google-services.json in android/app/. Update build.gradle files:
Add GoogleService-Info.plist via Xcode or using cocoapods:
Go to Firestore Database → Create database → Start in test mode (we’ll secure it later).
Always initialize Firebase.initializeApp() before runApp()
Use dependency injection for FirebaseAuth and Firestore instances
Enable offline persistence: FirebaseFirestore.instance.settings = Settings(persistenceEnabled: true)
Use StreamBuilder for real-time UI updates
Never store sensitive data in Firestore without proper rules
Handle FirebaseAuthException gracefully with user-friendly messages
Use Firebase Performance Monitoring and Crashlytics in production
Fix: Enable Google Sign-In in Firebase Console and add SHA-1 key.
Fix: Run flutter pub get, clean build: flutter clean && flutter pub get
Switch Firestore to production mode rules. Enable App Check. Use Firebase Hosting for web version.
Flutter Firebase integration is a superpower for mobile developers. With Firebase Authentication and Cloud Firestore, you can ship secure, real-time apps in days—not weeks.
You now have a complete, production-ready foundation. Extend it with Cloud Functions, Push Notifications, or Remote Config to build the next unicorn app.
Yes! The Spark Plan is free forever for low-traffic apps. Pay-as-you-go for scale.
Absolutely. Use Get.put(FirebaseAuth.instance) or Provider for DI.
Use FirebaseAuth.instance.authStateChanges() stream—it persists across restarts.
Firestore for complex queries, offline support, and scalability. RTDB for simple JSON trees.
Yes—if you write proper Security Rules and enable App Check.