π₯ Firelive
Firelive is a lightweight, real-time Firebase Firestore state management solution using Flutterβs ValueNotifier
. It offers two versions β V1
with advanced state handling, and V2
for minimal, fast use. Built for developers who want full control and performance without heavyweight state management libraries.
β¨ Features
- π‘ Real-time Firestore collection updates
- β‘ ValueNotifier-based reactivity (simple, fast)
- π§ Two versions: Full (V1) and Lite (V2)
- π Built-in error and loading state (V1)
- βΈοΈ Pause/resume stream manually (V1)
- π― Great for Firebase-powered Flutter apps (web, mobile, desktop)
π Versions
πΉ FirestoreLiveListV1
Includes loading, error, pause/resume, and real-time updates.
final users = FirestoreLiveListV1<UserModel>(
path: 'users',
queryBuilder: (col) => col.orderBy('created_at'),
fromMap: (data, id) => UserModel.fromMap(data, id),
);
await users.listen();
Use in a widget:
ValueListenableBuilder(
valueListenable: users.notifier,
builder: (_, list, __) => ListView(
children: list.map((e) => Text(e.name)).toList(),
),
);
Cleanup:
await users.dispose();
πΉ FirestoreLiveListV2
A minimal, fast version without loading/error/pause support.
final users = FirestoreLiveListV2<UserModel>(
collection: 'users',
queryBuilder: (col) => col.where('active', isEqualTo: true),
fromMap: (data) => UserModel.fromMap(data),
);
await users.listen();
π File Structure
lib/
βββ firelive.dart # Export both V1 and V2
βββ src/
βββ firestore_live_list_v1.dart
βββ firestore_live_list_v2.dart
π§ͺ Example
Use the /example
directory to try Firelive with a real Firebase setup.
π Installation
Add to your Flutter project:
dependencies:
firelive: ^0.0.1
π¨βπ» Author
Mohamed Razan
π Flutter & Firebase Developer
π§ mohamedrazanr@gmail.com
π GitHub: github.com/Mohamedrazan
πΌ LinkedIn: linkedin.com/in/mohamed-razan-35b073245
πͺͺ License
MIT License β free to use, modify, distribute, and contribute.
π€ Contributions
Contributions and feedback welcome! Submit an issue or PR on GitHub.
Built with simplicity and performance in mind β no Provider, Bloc, or Riverpod needed.