loadDataAsFuture method

Future<QuerySnapshot<Object?>> loadDataAsFuture(
  1. String collection
)

Loads data from the specified collection and returns it as a Future<QuerySnapshot>.

collection - The name of the collection.

Implementation

Future<QuerySnapshot> loadDataAsFuture(String collection) async {
  CollectionReference firebaseCollection;
  firebaseCollection = _fireStore.collection(collection);
  return await firebaseCollection.get();
}