Flutter : how i get data from firestore in List<String>?
3,126
Try using doc.data
listCour.add(doc.data);
Firestore.instance
.collection('MATH')
.document(doc.documentID)
.collection("cours")
.getDocuments()
.then((QuerySnapshot snapshot) {
snapshot.documents...
})
Comments
-
Abdelmjid Asouab over 1 year
hi guys i'm trying to get data from my firestore database into
List<String>
for that i create variableList<String> listCour;
and i use that instruction for get data from firestoreFirestore.instance .collection('MATH') .document(doc.documentID) .collection("cours") .snapshots() .listen( (cour)=> cour.documents.forEach((doc){ listCour.add(doc.documentID); }) );
but the List has get no data !!
-
Abdelmjid Asouab about 5 yearsno data :( i try any affection inside ` forEach((doc){ ---- } ` and didn't working i don't know why