In this example, I have shared a flutter firestore query example. Example below go through every document in the collection ‘fields’, and filter on ‘grower`. There is no documentation on that, but you may check the source code.
1 2 3 4 5 6 | import 'package:cloud_firestore/cloud_firestore.dart'; Firestore.instance.collection('fields').where('grower', isEqualTo: 1) .snapshots().listen( (data) => print('grower ${data.documents[0]['name']}') ); |
Here is the query from source code:
1 2 3 4 5 6 7 8 9 | Query where( String field, { dynamic isEqualTo, dynamic isLessThan, dynamic isLessThanOrEqualTo, dynamic isGreaterThan, dynamic isGreaterThanOrEqualTo, bool isNull, }) {..} |
If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.