withConverter<U extends Object?> method
DocumentReference<U>
withConverter<U extends Object?>({
- required FromFirestore<
U> fromFirestore, - required ToFirestore<
U> toFirestore,
Returns a reference to the same document that reads and writes objects
of type U through fromFirestore and toFirestore.
Implementation
DocumentReference<U> withConverter<U extends Object?>({
required FromFirestore<U> fromFirestore,
required ToFirestore<U> toFirestore,
}) {
return DocumentReference<U>(
key,
firestore,
FirestoreDataConverter<U>.from(
fromFirestore: fromFirestore,
toFirestore: toFirestore,
),
);
}