I am looking for a way to query by the document id instead of a field.
It might look something like that:
Firestore.instance.collection('tournaments').where(documentId, searchInput)
In this case searchInput
is an incomplete documentId.
I saw a solution on Stackoverflow, but it isn't for flutter: https://stackoverflow.com/a/52252264/8539070
Another thing to keep in mind is that I am trying to display a list of all documents in a collection that match some part of the id.
Thank you for your help!
You can also get several documents by their id using:
Firestore.instance.collection('tournaments')..where(FieldPath.documentId, whereIn: myIdList).snapshots()
where myIdList is a List
Enjoy
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With