0

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 Flutter Commented Nov 20, 2019 at 8:15
  • Lookup a tutorial on Firebase and Flutter. There are loads of them. Commented Nov 20, 2019 at 8:16
  • suggest me a one, please Commented 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. Commented Nov 20, 2019 at 8:36

1 Answer 1

0

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]

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.