I'm working on a Flutter app that shows events details at my university. I'm trying to make a favorite system that lets the user pinned the events by saving its name to a local list variable. So on the favorite page, I'd like to query each entry where its name matches those in the local variable. For example, I have this favorite list
var fav = ['Event 1', 'Event 5']
Here's my code so far
Stream _queryDb() {
Query query = db.collection('Event').orderBy('Start_time');
slides = query.snapshots().map((list) => list.documents.map((doc) => doc.data));
}
This will query every entry in my firestore db
But I want my query to query the entry with the name 'Event 1' and 'Event 5'
How can I do that? Thanks in advance!
PS. This is my first post on StackOverflow so I'm sorry if I'm not clear or I doesn't provide enough explanation/information.