querySingle method

Future<Iterable<T>> querySingle({
  1. required QueryTransformer<T> spec,
  2. required String type,
  3. DocumentReference<Object?>? parent,
  4. Source source = Source.serverAndCache,
})

Same as FirebaseRepository.query but instead of returning a Stream this will return a Future with the latest values in the Firestore.

Usage is as same as the example in FirebaseRepository.query

Implementation

Future<Iterable<T>> querySingle({
  required QueryTransformer<T> spec,
  required String type,
  DocumentReference? parent,
  Source source = Source.serverAndCache,
}) async {
  return _query2future(_merge(type, parent), spec, source);
}