getAllData method

  1. @override
Future<List> getAllData(
  1. String collectionId
)
override

Implementation

@override
Future<List> getAllData(String collectionId) async {
  await initialize();

  final List resultList = [];
  CollectionReference collectionRef = _db!.collection(collectionId);
  await collectionRef.get().then((snapshot) {
    for (var result in snapshot.docs) {
      resultList.add(result);
    }
  });
  return resultList;
}