firebase_dart
1.6.2, released 8 months ago by appsup.be
A pure Dart implementation of Firebase Authentication, Realtime Database, and Cloud Storage.
What it does
Provides a pure Dart port of Firebase clients so you can access authentication, realtime database, and cloud storage across any platform including command line apps. It allows running database and auth logic in separate isolates or without an external emulator during unit tests.
AI-written summary of version 1.6.2, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need Firebase services in pure Dart environments like command-line apps.
- You want to write unit tests for Firebase-dependent code without needing an external emulator.
- You want to run Firebase operations in a separate isolate to keep the main thread smooth for rendering.
Skip it when
- You need full official feature parity with native Firebase SDKs for every authentication provider or storage option.
- You rely heavily on features explicitly marked as unsupported in the package documentation (e.g., popup/redirect auth flows).
Strengths
- Pure Dart code works across all platforms, including command line and various desktop/mobile environments.
- Built-in testing support allowing local setup without an external Firebase emulator.
- Supports running the Firebase code in a separate isolate.
Weaknesses
- Does not support all functionalities of the official Firebase authentication and storage services.
- Query optimization features might occasionally conflict with very particular security rules.
Setup
- Kind
- Pure Dart
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 23
Initialize FirebaseDart with a storage path or use FirebaseDartFlutter.setup(), then initialize Firebase using your configuration options.
FirebaseDart.setup(storagePath: 'path/to/persistent/storage');
var app = await Firebase.initializeApp(
options: FirebaseOptions.fromMap(json
.decode(File('example/firebase-config.json').readAsStringSync())));Alternatives
Packages that do the same job and could replace firebase_dart.
- firebase_storage_web
Web implementation of Firebase Storage for Flutter.
77Compare - posthog_flutter
Flutter client for PostHog analytics, feature flags, and session replay
84Compare - firebase_core_web
Web implementation of firebase_core for Flutter apps.
83Compare - firebase_analytics_web
Web implementation of Firebase Analytics for Flutter apps.
77Compare
Works with
Packages commonly used together with firebase_dart: ones it builds on, ones built on it, and its own family.
- cryptofirebase_dart depends on itProvides SHA, MD5, and HMAC hashing functions for Dart.
- uuidfirebase_dart depends on itGenerates and parses RFC‑4122/9562 UUIDs (v1‑v8) for Dart.
- webfirebase_dart depends on itLightweight bindings for browser APIs via JS interop
- clockfirebase_dart depends on itA fakeable wrapper for dart:core clock APIs.
- asyncfirebase_dart depends on itUtility classes and helpers that extend Dart's async library.
- intlfirebase_dart depends on itA Dart library for internationalization and localization, providing message translation, plural/gender handling, and date/number formatting.
- loggingfirebase_dart depends on itProvides configurable logging with levels and stream listeners for Dart apps.
- web_socket_channelfirebase_dart depends on itCross‑platform WebSocket channel wrapper for Dart