Streambuilder not working with Firebase query with multiple where clause

Viewed 189

The following stream works when there's only one where query, but when there's multiple where queries the stream no longer works. Does anyone have any insights to this? Thanks!

StreamBuilder(
                        stream: FirebaseFirestore.instance
                            .collection('activities')
                            .where('userID', isNotEqualTo: currentUserID)
                            .where('audience', isEqualTo: 'Public')
                            .snapshots(),
1 Answers

You can't combine two queries if one of your queries includes isNotEqualTo clause.

You'll have to use a single query (or combine it one by one) on the client side.

Related