getDocFromField method

Future<FireDoc?> getDocFromField(
  1. String field
)

Implementation

Future<FireDoc?> getDocFromField(String field) async {
  final snapshot = await _getSnapshot();
  final doc = snapshot.data()?[field];
  if (doc is DocumentReference<Map<String, dynamic>>) {
    return FireDoc(doc);
  } else {
    return null;
  }
}