I've defined the following firestore listener:
_eventsDataListener = Firestore.instance
.collection('events')
.where('group_id', isEqualTo: _userData.groupId)
.orderBy('time', descending: true)
.limit(20)
.snapshots()
.listen(onEventsData);
It works only once (when entering the state), but doesn't work after that.
Some observations:
- If I remove the orderBy or the where conditions it works just fine
- In my Firebase console I can't see any (automatically) created indexes
- I don't get any errors (in the console) saying I should create an index
- Even if I create such a composite index, it still doesn't work
Any idea?