I am trying to get all records having a particular email value. Here email1
is user provided.
I have tried :
QuerySnapshot userList = await users!.where('email', '>=', email1).where('email', '<=', email1).get(); \\ gives syntax error
users!.where("email", isGreaterThan: email1).get(); \\ returns all records
users!.where("email", isGreaterThan: email1).where("email", isLessThan: email1).get(); \\ returns no record
users!.where('email', arrayContainsAny: [email1]).get() \\ returns no record
Any help in this regard would be appreciated.
CodePudding user response:
I think you're looking for isEqualTo
:
users!.where("email", isEqualTo: email1).get();