firewatch 1.3.1
firewatch: ^1.3.1 copied to clipboard
Lightweight Firestore repositories for Flutter: single-doc, collection, and collection-group repos that react to auth, stream updates, and support live-window pagination.
Changelog #
1.3.1 #
Fixed #
- Web compatibility:
parentIdinjection no longer crashes on web.cloud_firestore_webthrows an Expando error when calling.parenton a top-levelCollectionReference(where the parent isnull). The newparentIdOf()helper wraps the call in a try-catch, returningnullfor top-level collections.
1.3.0 #
Added #
parentIdis now automatically injected into the data map before callingfromJsonacross all three repository types. Models can opt-in by declaring aparentIdfield in theirfromJsonfactory — no changes toJsonModelrequired. Particularly useful for collection group queries where documents with the same ID can live under different parents.
1.2.0 #
Added #
FirestoreCollectionGroupRepository<T>— reactive queries across all subcollections with the same name via FirestorecollectionGroup(). Supports live pagination, per-item notifiers keyed by full document path, and path-based CRUD (set,update,patch,delete).QueryRefBuildertypedef andGroupPatchrecord type for collection group write operations- Updated README with collection group examples
Fixed #
FirestoreDocRepositorystream subscription now has anonErrorhandler. Previously a stream error (permission denied, network failure) would leaveisLoadingstuck attrueforever.
1.1.0 #
Added #
- Repositories now work without
authUidfor public/unauthenticated collections (e.g.static/config). OmittingauthUidqueries Firestore immediately instead of waiting for a signed-in user. - Updated doc comments with public-collection usage examples
1.0.0 #
- Stable release — no API changes, just documentation polish
- Added doc comments to all public members across both repository types
0.3.0 #
Improved #
- Collection repo now primes UI from Firestore local cache before starting the live subscription, giving instant data on revisits
- Incremental snapshot processing via
docChanges— only re-parses added/modified/removed documents instead of deserializing the full list on every snapshot event - Per-item notifiers are now pruned (removed from the map) when documents leave the snapshot, preventing unbounded memory growth over long sessions
0.2.0 #
Breaking #
- Bumps
command_itfrom ^8.0.0 to ^9.0.0 - Requires Dart >=3.8.0 and Flutter >=3.32.0
writecommand onFirestoreDocRepositoryno longer accepts an unreachablemergeparameter (always merges)
Fixed #
- Race condition in
FirestoreDocRepository._swapon rapid auth changes (added epoch guard) _resizingflag inFirestoreCollectionRepositorycould get permanently stuck, breakingloadMore()- Deleted documents now correctly clear
valuetonullinFirestoreDocRepository - Pagination limit now resets on query/dependency changes
- Per-item notifiers are nulled out when documents leave the snapshot
- All
Commandobjects are now properly disposed
Improved #
- Bumps
cloud_firestoreto ^6.0.0,flutter_lintsto ^6.0.0 - Fixes CI docs workflow (uses stable Flutter channel, gh-pages v4)
- Test coverage increased from 4 to 26 tests (94% line coverage)
0.1.4 #
- Adds
paginateoption toFirestoreCollectRepositoryto enable pagination of collection queries
0.1.3 #
- Improves example and README
0.1.2 #
- Formatting issue
0.1.1 #
- Adds better documentation, examples, and updates licence
0.1.0 #
- Initial release: single-doc and collection repositories
- Live-cache prime, metadata-churn squash
- Live-window pagination, per-item notifiers
- Simple CRUD commands