简体   繁体   中英

How to get documents from Firestore without a single document id

So i have a collection named products in my Firestore and it contains all my products. Since i am using Tag widget it gives me an error when there is more than one item sharing the same tag. So for my Products Builder i want to give a list that contains all my products without a specific product catched by his id, so stream property of my Stream Builder can be like this.

StreamBuilder(stream: Firestore.instance.collection('products').WITHOUT SPECIFIC PRODUCT ID .snapshot()
builder:...)

How can i do that?

It's not possible to construct a query for all documents except one. There are no inequality filters in Firestore .

Since it's just one document, it makes sense to simply do the query for all documents, the have the client code remove the one you don't want from the result set.

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