Skip to content
pubscout

firebase_ui_database

3.0.0, released 4 days ago by firebase.google.com

Pre‑built Flutter widgets for displaying Firebase Realtime Database data.

WASM-ready
$ flutter pub add firebase_ui_database
Source repository

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.

Works with

Packages commonly used together with firebase_ui_database: ones it builds on, ones built on it, and its own family.