firebase_ui_database
3.0.0, released 4 days ago by firebase.google.com
Pre‑built Flutter widgets for displaying Firebase Realtime Database data.
What it does
The package offers ready‑made UI components that connect to Firebase Realtime Database and automatically update when the data changes. It includes helpers for queries, pagination and common list/detail patterns, reducing boilerplate code.
AI-written summary of version 3.0.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need a quick UI to show realtime data from Firebase without writing low‑level stream handling.
- You are building admin panels, dashboards or simple list/detail screens that map directly to database nodes.
Skip it when
- You require highly custom UI or complex interactions that the provided widgets cannot express.
- Your app does not use Firebase or you prefer a different backend.
Strengths
- Speeds up development by providing ready‑made widgets.
- Seamlessly integrates with FlutterFire and works on all major platforms.
- Handles realtime streams and pagination out of the box.
Weaknesses
- Limited customization compared to building widgets manually.
- Adds an extra dependency layer; breaking changes may require migration.
- Only works with Firebase Realtime Database, not other backends.
Setup
- Kind
- Flutter widgets
- Effort
- Medium
- Code generation
- No
- Direct dependencies
- 3
Add firebase_core, firebase_database and firebase_ui_database to pubspec, initialize Firebase in main(), configure iOS/Android native Firebase files (Google‑Service‑Info.plist, google-services.json). No CocoaPods required after v3.0.0.
import 'package:flutter/material.dart';
import 'package:firebase_core/firebase_core.dart';
import 'package:firebase_ui_database/firebase_ui_database.dart';
void main() async {
WidgetsFlutterBinding.ensureInitialized();
await Firebase.initializeApp();
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(title: const Text('Realtime List')),
body: FirebaseDatabaseListView(
query: FirebaseDatabase.instance.ref('items'),
itemBuilder: (context, snapshot) {
return ListTile(title: Text(snapshot.child('name').value.toString()));
},
),
),
);
}
}Alternatives
Packages that do the same job and could replace firebase_ui_database.
- cloud_firestore
If you prefer Firestore over Realtime Database, this package offers similar UI helpers for Firestore data.
98Compare
Works with
Packages commonly used together with firebase_ui_database: ones it builds on, ones built on it, and its own family.
- firebase_databasefirebase_ui_database depends on itFlutter plugin for Firebase Realtime Database with offline access and realtime syncing.
- firebase_ui_localizationsfirebase_ui_database depends on itProvides localized strings for Firebase UI Auth, Firestore and Database widgets.
- firebase_coreSame familyFlutter plugin that initializes Firebase and allows multiple Firebase app connections.
- firebase_core_webSame familyWeb implementation of firebase_core for Flutter apps.
- firebase_messagingSame familyFlutter plugin for Firebase Cloud Messaging to deliver messages on Android, iOS, web, and macOS.
- firebase_messaging_webSame familyWeb implementation of Firebase Cloud Messaging for push notifications.
- firebase_analyticsSame familyFlutter plugin for Google Analytics for Firebase.
- firebase_crashlyticsSame familyFlutter plugin that sends uncaught errors and crash reports to Firebase Crashlytics.