flamingo
3.0.0, released 4 years ago by neverjp.com
Firebase Firestore model framework library with code generation for Dart.
What it does
Provides an object-model mapping framework for Firebase Firestore and Cloud Storage. It maps Firestore documents and collections to Dart classes using annotations and build_runner, supporting sub-collections, paging, caching, and batch operations.
AI-written summary of version 3.0.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You are building a Flutter app heavily integrated with Cloud Firestore and want structured models.
- You want automatic JSON mapping for Firestore documents using annotations.
- You need built-in handling for sub-collections, batch writes, transactions, and collection paging.
Skip it when
- You are using a backend other than Firebase Firestore.
- You prefer writing raw Map-based Firestore queries without schema models.
Strengths
- Simplifies Firestore CRUD operations via DocumentAccessor, Batch, and Transaction.
- Code generation helps keep models and data mapping boilerplate-free.
- Supports collection paging, caching, and sub-collections natively.
Weaknesses
- Requires running build_runner for code generation.
- Tight coupling to Cloud Firestore.
Setup
- Kind
- Flutter widgets
- Effort
- Medium
- Code generation
- Yes (build_runner)
- Direct dependencies
- 5
Requires setting up cloud_firestore, adding flamingo and flamingo_annotation to dependencies, and flamingo_generator with build_runner to dev_dependencies. Initialize with Flamingo.initializeApp().
import 'package:flamingo/flamingo.dart';
void main() async {
WidgetsFlutterBinding.ensureInitialized();
await Flamingo.initializeApp();
}Alternatives
Packages that do the same job and could replace flamingo.
- cloud_firestore_web
The web implementation of cloud_firestore.
82Compare - firebase_storage_web
Web implementation of Firebase Storage for Flutter.
77Compare - firebase_functions
Define Cloud Functions for Firebase in Dart with support for the Admin SDK and Firestore.
80Compare - cloud_functions
Flutter plugin for using the Cloud Functions for Firebase API.
96Compare
Works with
Packages commonly used together with flamingo: ones it builds on, ones built on it, and its own family.
- rxdartflamingo depends on itImplementation of the ReactiveX API for asynchronous programming leveraging native Dart Streams.
- firebase_coreflamingo depends on itFlutter plugin that initializes Firebase and allows multiple Firebase app connections.
- universal_ioflamingo depends on itCross-platform dart:io implementation with browser support for HttpClient and other APIs
- cloud_firestoreflamingo depends on itFlutter plugin for Cloud Firestore noSQL database with live synchronization.
- firebase_storageflamingo depends on itFlutter plugin to read and write files in Firebase Cloud Storage.