I am using firestore in flutter. I have to create a group like whatsapp group for that I'm getting group name, group currency,group admin and a list of members which includes fullname and phonenumber as you can see
groupadmin : "+923009399237"
groupcurrency : "USD"
groupmembers : "[
{"fullname":"ABC",
"phonenumber":"+923475894561"
},
{"fullname":"ASD",
"phonenumber":"+922222222211"
}
]"
groupname : "First Group"
I have tried something like this but it doesn't work.
Firestore.instance
.collection('groups')
.where("groupmember.phonenumber", isEqualTo: 090909090)
.snapshots()
.listen((data) {
if (data.documents.length > 0) {
}
Is there anyway to directly find the group which has member with phonenumber == 0909090909. Please help me out in this.