getSingle method

Future<T?> getSingle(
  1. String id
)

Get a single document of id from the collection Returns null if the document does not exist

Implementation

Future<T?> getSingle(String id) async {
  var snap = await _db.collection(collection).doc(id).get();
  if (!snap.exists) return null;
  return fromDS(snap.id, snap.data());
}