0
votes

What code do I write in order to retrieve data from a subcollection in Firestore?

These are my collections and subcollection and the data fields in the subcollection document. I don't know the code for how to access this data from the document in the Running subcollection? Please help!

enter image description here

enter image description here

enter image description here

1
Did you try anything yet? - Frank van Puffelen

1 Answers

0
votes

hey it's very easy to retrive subcollection : Like this fuction

  getData() async {
return await FirebaseFirestore.instance
    .collection("Collectionname").doc("doc").collection("subcollection")
    .snapshots();
        }