简体   繁体   中英

Flutter FireStore query get document 's collection

i have collection called groups inside it there are more than one documents and each document has some files one the files is called "special" a boolean now inside each document we have files collection only one document will have the special set to true how can query only the files of the 'special' document

Firestore.instance
          .collection('groups')
          .document("english")
          .collection("groups")
          .where('special', isEqualTo: true)
                      .snapshots(),

this will get me only the document but i want the files collection of the document so i have to do another hit? thanks在此处输入图像描述

I think you should hit

Firestore.instance
          .collection('groups')
          .document("english")
          .collection("files")

if i understood correctly your demand

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM