Get all from a Firestore collection in Flutter

后端 未结 4 792
一整个雨季
一整个雨季 2020-12-08 16:28

I set up Firestore in my project. I created new collection named categories. In this collection I created three documents with uniq id. Now I want to get this c

4条回答
  •  Happy的楠姐
    2020-12-08 17:05

    Here is the code if you just want to read it once

       QuerySnapshot querySnapshot = await Firestore.instance.collection("collection").getDocuments();
        var list = querySnapshot.documents;
    

提交回复
热议问题