getDocumentOriginal<T extends Object?> function

Future<DocumentSnapshotForAll<T>> getDocumentOriginal<T extends Object?>(
  1. DocumentReference<Map<String, dynamic>> ref, {
  2. required DocRef<T> docRef,
})

Implementation

Future<DocumentSnapshotForAll<T>> getDocumentOriginal<T extends Object?>(
    DocumentReference<Map<String, dynamic>> ref,
    {required DocRef<T> docRef}) async {
  late DocumentSnapshotForAll<T> doc;
  await ref.get().then((value) {
    doc = DocumentSnapshotForAll<T>(value.data(), value.id, ref.path, docRef);
  });
  return doc;
}