fcode_bloc library

Classes

CachedRepository<T extends DBModelI>
This is a wrapper for query method in FirebaseRepository.
ComplexWhere
Apply where operation to the queried data. Provide the field that the data is needed to be filtered. Other fields will specify how.
DBModel
A FirebaseRepository will return models of this type once data is retrieved from the DB.
DBModelI
Interface that will provide basic functionality for a DBModel that is used to store a document in Firestore.
FirebaseRepository<T extends DBModelI>
A repository that can be used to add, query, update and delete document from Firestore.
Limit
Limit the queried data to a given length.
ModelCache<T extends DBModelI>
Create a memory cache for Models. For this module to work correctly Firebase cache has to be turned on. (It is automatically on unless you change Firebase configuration to turn it off)
MultiQueryTransformer
To learn more on how to use this in an application, look at FirebaseRepository.query.
OrderBy
Order the queried data in ascending or descending order. Provide the field that the data is needed to ordered with. descending will determine the order.
RepositoryAddon<T extends DBModelI>
Provide additional functionality to a FirebaseRepository
TextStartWithQuery
To learn more on how to use this in an application, look at FirebaseRepository.query.

Mixins

QueryTransformer
This will will transform one type of Query to another type of Query.

Typedefs

MapperCallback<T> = Map<String, dynamic> Function(T item)
Map an DBModel to a [Map<String, dynamic> so that Firestore can understand which fields to be updated. Put only fields that's needed to be updated in the returning Map.