fromFirestore abstract method

T fromFirestore(
  1. DocumentSnapshot<Map<String, Object?>> snapshot,
  2. SnapshotOptions? options
)

Called by the SDK to convert a snapshot of an existing document into T. snapshot is an untyped snapshot (at runtime a QueryDocumentSnapshot, so snapshot.data() is never null). Use snapshot.data(serverTimestamps: options?.serverTimestamps ?? ServerTimestampBehavior.none) to honour the requested server timestamp behavior.

Implementation

T fromFirestore(
  DocumentSnapshot<Map<String, Object?>> snapshot,
  SnapshotOptions? options,
);