I'm trying to get documents in brews collection from Firestore.
What is wrong with my code?
Help me somebody who is used to Flutter and Firebase.
////brew list from snapshot
List<Brew> _brewListFromSnapshot(QuerySnapshot snapshot) {
return snapshot.docs.map((document) {
return Brew(
name: document.data()['name'] ?? '',
strenght: document.data()['strength'] ?? 0,
sugars: document.data()['sugars'] ?? '0',
);
}).toList();
}
Attached screenshots regarding error:
