Nimbostratus class
Nimbostratus is a reactive data-fetching and state management library built on top of Cloud Firestore.
Properties
- firestore → FirebaseFirestore
-
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
addDocument<
T> (CollectionReference< T> collection, T data, {WritePolicy writePolicy = WritePolicy.serverFirst}) → Future<NimbostratusDocumentSnapshot< T?> > - Adds a Firestore document and updates the in-memory cache according to the specified WritePolicy.
-
batchUpdateDocuments(
Future< void> updateCallback(NimbostratusUpdateBatcher batcher)) → Future<void> -
Allows batch updating of documents using the Nimbostratus write policies on top of the
Firestore
WriteBatch
APIs. Useful for performing optimistic cache updates that are rolled back if the batch update fails. Ex. -
clearDocuments(
) → void - Clears all documents from the Nimbostratus in-memory cache.
-
deleteDocument<
T> (DocumentReference< T> ref, {DeletePolicy deletePolicy = DeletePolicy.serverFirst}) → Future<void> -
getDocument<
T> (DocumentReference< T> docRef, {GetFetchPolicy fetchPolicy = GetFetchPolicy.serverOnly, NimbostratusFromFirestore<T> ? fromFirestore}) → Future<NimbostratusDocumentSnapshot< T?> > - Retrieves a Firestore document from the in-memory cache or server according to the specified GetFetchPolicy.
-
getDocuments<
T> (Query< T> docQuery, {GetFetchPolicy fetchPolicy = GetFetchPolicy.serverOnly, NimbostratusFromFirestore<T> ? fromFirestore}) → Future<List< NimbostratusDocumentSnapshot< >T?> > -
Executes a Firestore
Query
for documents against the in-memory cache or server according to the specified GetFetchPolicy. -
modifyDocument<
T> (DocumentReference< T> ref, T modifyFn(T? currentValue), {WritePolicy writePolicy = WritePolicy.serverFirst, ToFirestore<T> ? toFirestore, NimbostratusFromFirestore<T> ? fromFirestore}) → Future<NimbostratusDocumentSnapshot< T?> > - Updates a Firestore document and updates the in-memory cache according to the specified WritePolicy. Convenience wrapper around the updateDocument API that provides an update callback which is given the current document value.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
setDocument<
T> (DocumentReference< T> ref, T data, {WritePolicy writePolicy = WritePolicy.serverFirst, SetOptions? options, NimbostratusFromFirestore<T> ? fromFirestore}) → Future<NimbostratusDocumentSnapshot< T?> > - Sets a Firestore document and updates the in-memory cache according to the specified WritePolicy.
-
setStore(
FirebaseFirestore store) → void - Set the internal Firebase store used to interact with the cloud_firestore APIs. Used in tests to mock out the store.
-
streamDocument<
T> (DocumentReference< T> ref, {StreamFetchPolicy fetchPolicy = StreamFetchPolicy.serverFirst, NimbostratusFromFirestore<T> ? fromFirestore}) → Stream<NimbostratusDocumentSnapshot< T?> > - Streams changes to a Firestore document from the in-memory cache or server according to the specified StreamFetchPolicy.
-
streamDocuments<
T> (Query< T> docQuery, {StreamFetchPolicy fetchPolicy = StreamFetchPolicy.serverFirst, NimbostratusFromFirestore<T> ? fromFirestore}) → Stream<List< NimbostratusDocumentSnapshot< >T?> > -
Streams changes to the specified Firestore
Query
for documents against the in-memory cache or server according to the specified StreamFetchPolicy. -
toString(
) → String -
A string representation of this object.
inherited
-
updateDocument<
T> (DocumentReference< T> ref, T data, {WritePolicy writePolicy = WritePolicy.serverFirst, ToFirestore<T> ? toFirestore, NimbostratusFromFirestore<T> ? fromFirestore}) → Future<NimbostratusDocumentSnapshot< T?> > - Updates a Firestore document and updates the in-memory cache according to the specified WritePolicy.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- instance → Nimbostratus
-
final