This is my firebase database structure I want stream chats only where the participant's id is equal to the current user id please give a good solution with stream builder flutter and it should be based on firebase store one
Another thing is firebase suggests creating composite I also create this as well the data is retrieved as an empty array
I tried the query below attached but it not worked
Stream<QuerySnapshot<Object?>> groupChatsStream() {
CollectionReference groupChatsRef =
FirebaseFirestore.instance.collection('todo');
Query query = groupChatsRef.where('participants', arrayContains: '11');
return query.snapshots();}