0

Is it possible to query the field (userEmail) like below, converting the field value to lowercase and parameter to lowercase or uppercase.

return _firestore
       .collection("users")
       .where(FieldPath.documentId, isEqualTo: teamKey)
       .where("status", isEqualTo: 1)
       .where("Email".trim().toLowerCase(), isEqualTo: useremail.trim().toLowerCase())
       .get();
fazilSizzlers
  • 195
  • 10
  • Firestore queries are case-sensitive. The common approach is to store an additional lowercase value for the search (i.e. `EmailLowercase`) and then use that in the query. – Frank van Puffelen Sep 29 '22 at 14:58

0 Answers0