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.
constfactory
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< snapshot) → TString, Object?> > -
Converts the data of
snapshot(an existing document) to aT. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toFirestore(
T value, SetOptions? options) → Map< String, Object?> -
Converts
valueto the map to write.optionsare the options of thesetcall, null when it had none. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited