withConverter<R extends Object?> method

ColRef<R> withConverter<R extends Object?>({
  1. required R fromFirestore(
    1. DocumentSnapshotForAll<R>,
    2. dynamic
    ),
  2. required Map<String, Object?> toFirestore(
    1. R,
    2. dynamic
    ),
})

Implementation

ColRef<R> withConverter<R extends Object?>(
    {required R Function(DocumentSnapshotForAll<R>, dynamic) fromFirestore,
    required Map<String, Object?> Function(R, dynamic) toFirestore}) {
  FirestoreConverter<R> converter = FirestoreConverter<R>(
      toFirestore: toFirestore, fromFirestore: fromFirestore);
  return ColRef<R>._withQuery(reference,
      queryProperties: _queryProperties, converter: converter);
}