简体   繁体   中英

How to get data from firebase with field value?

I Want to get data from firebase as a field like category.means i want to get data Such in image Field category value is fashion so all items where field category value fashion data are retrive so which query i use for it anyone tell me?

I think you're looking for this query:

FirebaseFirestore.instance
  .collection('users')
  .where('category', isEqualTo: 'fashion')
  .get()
  .then(...);

I highly recommend reading the FlutterFire documentation on filtering data , and keeping the reference documentation on the where method handy.

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