TurboFirestoreStreamApi<T> extension

Extension that adds stream operations to TurboFirestoreApi

Provides methods for real-time document updates from Firestore

Features:

  • Collection streaming
  • Single document streaming
  • Query-based streaming
  • Type-safe streaming
  • Automatic conversion
  • Collection group support

Example:

final api = TurboFirestoreApi<User>();
final stream = api.streamAll();
stream.listen((snapshot) {
  print('Got ${snapshot.docs.length} users');
});

See also: TurboFirestoreListApi one-time list operations TurboFirestoreSearchApi search operations

on

Methods

streamAll() Stream<QuerySnapshot<Map<String, dynamic>>>

Available on TurboFirestoreApi<T>, provided by the TurboFirestoreStreamApi extension

Streams all documents from a collection with exception handling
streamAllWithConverter() Stream<List<T>>

Available on TurboFirestoreApi<T>, provided by the TurboFirestoreStreamApi extension

Streams and converts all documents from a collection with error handling
streamByDocId({required String id, String? collectionPathOverride}) Stream<DocumentSnapshot<Map<String, dynamic>>>

Available on TurboFirestoreApi<T>, provided by the TurboFirestoreStreamApi extension

Streams a single document
streamByQuery({required CollectionReferenceDef<Map<String, dynamic>>? collectionReferenceQuery, required String whereDescription}) Stream<List<Map<String, dynamic>>>

Available on TurboFirestoreApi<T>, provided by the TurboFirestoreStreamApi extension

Streams documents matching a query
streamByQueryWithConverter({CollectionReferenceDef<T>? collectionReferenceQuery, required String whereDescription}) Stream<List<T>>

Available on TurboFirestoreApi<T>, provided by the TurboFirestoreStreamApi extension

Streams and converts documents matching a query
streamDocByIdWithConverter({required String id, String? collectionPathOverride}) Stream<T?>

Available on TurboFirestoreApi<T>, provided by the TurboFirestoreStreamApi extension

Streams and converts a single document