get method

  1. @override
Future<Map<String, Object?>?> get(
  1. String collection,
  2. String id
)
override

The document id of collection, or null when it doesn't exist.

Implementation

@override
Future<Map<String, Object?>?> get(String collection, String id) async {
  final snapshot = await firestore.collection(collection).doc(id).get();
  onRead?.call('get');
  return snapshot.exists ? _data(snapshot.data()) : null;
}