getData method

  1. @override
Future<Map<String, dynamic>> getData(
  1. String collectionId,
  2. String mid
)
override

Implementation

@override
Future<Map<String, dynamic>> getData(String collectionId, String mid) async {
  await initialize();
  CollectionReference collectionRef = _db!.collection(collectionId);
  DocumentSnapshot<Object?> result = await collectionRef.doc(mid).get();
  if (result.data() != null) {
    return result.data() as Map<String, dynamic>;
  }
  return {};
}