I'm flutter user with firebase connected.
I'm trying to call list of users from cloud firestore with querysnapshot when users call search feature and then string submitted. What I've tried is snippet below:
Future<QuerySnapshot> allUsers = usersReference
.where("profileName",
isGreaterThanOrEqualTo: str)
.getDocuments();
setState(() {
futureSearchResults = allUsers;
});}
The problem is I have to make 'profileName' called by querysnapshot 'case insensitive'. For example, profileName 'HELLO WORLD' in cloud firestore must be printed as 'hello world' in my android studio flutter console. So i need a flutterFire method to convert all uppercase characters from cloud firestore to lowercase characters. Unfortunately, i couldn't find simple property to set case-insensitive from flutterFire plugIn.. ]:
Furthermore, what i'm trying to call from firestore is not a bunch of strings but certain form of document which is going to be converted to certain custom class written in dart. It made me unavailable with neat dart methods like toLowerCase().
If anyone know method in dart code to change uppercase characters from cloud firestore to lowercase, please share your knowledge.
Clear answers so appreciated!! Thank you in advance [: