TurboFirestoreGetApi<T> extension

Extension that adds read/get operations to TurboFirestoreApi

This extension provides methods for retrieving documents from Firestore

Features:

  • Single document retrieval
  • Type-safe document conversion
  • Document reference access
  • Local ID and reference field management
  • Collection group queries
  • Custom collection path overrides

Example:

final api = TurboFirestoreApi<User>();
final response = await api.getById(id: 'user-123');

See also:

on

Methods

getById({required String id, String? collectionPathOverride}) Future<TurboResponse<Map<String, dynamic>>>

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

Retrieves a document by its unique identifier
getByIdWithConverter({required String id, String? collectionPathOverride}) Future<TurboResponse<T>>

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

Retrieves and converts a document by its unique identifier
getDocRefById({required String id, String? collectionPathOverride}) → DocumentReference<Map<String, dynamic>>

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

Gets a document reference by ID for raw data access
getDocRefByIdWithConverter({required String id, String? collectionPathOverride}) → DocumentReference<T>

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

Gets a document reference with type conversion
getDocSnapshotById({required String id, String? collectionPathOverride}) Future<DocumentSnapshot<Map<String, dynamic>>>

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

Gets a document snapshot for raw data access
getDocSnapshotByIdWithConverter({required String id, String? collectionPathOverride}) Future<DocumentSnapshot<T>>

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

Gets a document snapshot with type conversion