easy_fire 1.0.0
easy_fire: ^1.0.0 copied to clipboard
The simplest way to do CRUD on Firestore. One class, any model, any nested path. Zero boilerplate.
Changelog #
All notable changes to easy_fire will be documented in this file.
1.0.0 - 2024-03-26 #
🎉 Initial Release #
Added
-
FireCollection<T>— the core class. One instance per Firestore collection.add(model, setId)— insert with auto-generated IDset(id, model)— insert with specific IDgetById(id)— fetch one documentgetAll()— fetch all documents (one-time)streamAll()— real-time stream of all documentsstreamWhere(field, value)— real-time filtered streamstreamBetween(field, from, to)— real-time date range streamupdate(id, model)— full document overwritepatch(id, fields)— partial update (only the fields you pass)delete(id)— delete a documentsearch(field, prefix)— real-time prefix searchexists(field, value)— check if document existscount(field, value)— count matching documentsquery()— returns aFireQueryfor advanced chainingsub(docId, collectionName, fromMap, toMap)— navigate into any sub-collection
-
FireQuery<T>— fluent chainable query builder.where(field, value)— equality filter.whereNot(field, value)— not-equal filter.whereBetween(field, from, to)— range filter.whereStartsWith(field, prefix)— prefix text search.orderBy(field, descending)— sort results.limit(count)— limit number of results.fetch()— one-time fetch.stream()— real-time stream
-
FireCopy— copy documents between Firestore collectionsFireCopy.one(from, to)— copy a single documentFireCopy.all(from, to)— batch-copy all documents in a collection
Supported Firestore path formats
- Simple:
'tasks' - Nested:
'countries/eg/cities/cairo/products' - Deeply nested via
.sub(): unlimited levels
[Unreleased] #
Planned #
addAll(List<T>)— batch insert multiple documentsdeleteWhere(field, value)— delete all matching documentsonErrorcallback support for streams- Offline persistence helpers
- Unit test coverage