I want to create a query which contains all the documents in the free collection which have in the field list the value item2
4
-
Possible duplicate of Firestore queries on FlutterKavin-K– Kavin-K2019-11-20 08:15:52 +00:00Commented Nov 20, 2019 at 8:15
-
Lookup a tutorial on Firebase and Flutter. There are loads of them.Abion47– Abion472019-11-20 08:16:28 +00:00Commented Nov 20, 2019 at 8:16
-
suggest me a one, pleasethe coder– the coder2019-11-20 08:24:47 +00:00Commented Nov 20, 2019 at 8:24
-
StackOverflow is a site for problems and solutions, not a forum to ask for recommendations. The tutorials are literally a Google search away.Abion47– Abion472019-11-20 08:36:40 +00:00Commented Nov 20, 2019 at 8:36
Add a comment
|
1 Answer
Use this query in StreamBuilder and retrieve data through it.
stream: Firestore.instance.collection('free').snapshots()
In stream we can get all documents.
Finally we can get item by accessing first document .ie data[0].In the first document we will get ['list'] and in that list we will get the first item which is item 4.
snapshot.data[0]['list'][0]
