FirestoreDataConverter<T> class abstract

Converts between the objects of an application and the maps Firestore stores, for references and queries made with withConverter.

Unlike the converter of the main library, fromFirestore has no snapshot options: a Firestore Lite snapshot never holds a pending server timestamp.

Constructors

FirestoreDataConverter()
For subclasses.
const
FirestoreDataConverter.from({required FromFirestore<T> fromFirestore, required ToFirestore<T> toFirestore})
A converter made of two functions.
const
factory

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

fromFirestore(QueryDocumentSnapshot<Map<String, Object?>> snapshot) → T
Converts the data of snapshot (an existing document) to a T.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toFirestore(T value, SetOptions? options) → Map<String, Object?>
Converts value to the map to write. options are the options of the set call, null when it had none.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited