I need to fetch documents that 'uid', isEqualTo: 'IeXbRCpmB8ejUdYh7nn4IQ2HgUC3'
Above list is containing maps.
How can I do this on flutter?
I tried below code but it's giving No Data as output.
StreamBuilder<QuerySnapshot>(
stream: FirebaseFirestore.instance
.collection('abc')
.where('list.uid', isEqualTo: 'ijQS0rKB4aOJSoTKy1zvmy8O9me2')
.snapshots(),
builder: (context, snapshot) {
if (snapshot.hasError) {
return const Center(child: Text('Something wrong!'));
}
if (snapshot.connectionState == ConnectionState.waiting) {
return const Center(child: CircularProgressIndicator());
}
if (snapshot.data!.size == 0) {
return const Center(
child: Text('No Data'),
);
}
return const Center(child: Text('Done'));
},
)
How do I perform this query?


array-contains), you can't query on a partial match of an item in an array. If you want to be able to query on just the UID, consider having an additional field (e.g.listUIDs) with just those values and then usingarray-containson that.