Flutter Setup with Firebase CLI: Full Integration Guide

Want to integrate Firebase into your Flutter app using the Firebase CLI? This guide will take you through the Firebase CLI-based setup step by step — clean, efficient, and suitable for scalable Flutter projects.
Prerequisites
- Flutter SDK installed (
flutter doctor
) - Node.js and npm installed
- Firebase CLI installed
- Firebase account: Firebase Console
Step 1: Install Firebase CLI
If you haven’t installed it yet:
npm install -g firebase-tools
Check if it’s installed:
firebase --version
Step 2: Login to Firebase
firebase login
This will open a browser window for Google sign-in.
Step 3: Create a New Flutter Project (If Needed)
flutter create flutter_firebase_cli_app
cd flutter_firebase_cli_app
Step 4: Initialize Firebase in Your Project
firebase init
Choose the following options during setup:
- Hosting: Configure and deploy Firebase Hosting
- Firestore, Functions, or other services if needed
Follow the prompts:
- Select existing Firebase project (or create one from Firebase Console)
- Set
public
directory (for Flutter web usebuild/web
) - Configure as SPA → Yes
- Overwrite index.html → No
Step 5: Build Your Flutter Web App
flutter build web
Step 6: Deploy to Firebase Hosting
firebase deploy
After deployment, Firebase CLI will provide a Hosting URL. Open it in your browser to see your Flutter web app live!
Conclusion
You've now successfully set up Firebase Hosting using Firebase CLI with your Flutter project. This method is clean, repeatable, and perfect for professional deployment workflows.
0 Comments
Hello there! Your Flutter form submission is impeccable. The way you've seamlessly integrated form fields and handled user input showcases your mastery of Flutter's capabilities. The user experience is smooth, thanks to your thoughtful design and validation logic.
The form's visual appeal is on point, with a clean and intuitive layout that ensures users can easily interact with it. Error handling is impressive too, as it gracefully guides users through any mistakes they might make during input.
Overall, your Flutter form demonstrates your commitment to creating user-friendly and aesthetically pleasing applications. Keep up the excellent work!