Firebase gives you a backend without writing servers: authentication, a realtime NoSQL database (Firestore), storage and push notifications.
Set up
- Run
flutterfire configureto link your Firebase project. - Initialise in main:
await Firebase.initializeApp(). - Add only the packages you need (firebase_auth, cloud_firestore, etc.).
// Firestore: read a collection live
StreamBuilder(
stream: FirebaseFirestore.instance.collection('posts').snapshots(),
builder: (ctx, snap) {
if (!snap.hasData) return CircularProgressIndicator();
final docs = snap.data!.docs;
return ListView(children: docs.map((d) => Text(d['title'])).toList());
},
)
Tip: Firestore streams update the UI in real time — great for chats and feeds.
Summary
Firebase provides auth, realtime Firestore data, storage and notifications, letting you ship full apps without your own server.