findAll method
Implementation
Future findAll(collectionName) async {
List documents = [];
await _firestore.collection(collectionName).get().then((d) {
for (var element in d.docs) {
documents.add(element.data());
}
});
if (documents == []) {
return null;
} else {
return documents;
}
}