I have declared a global variable and defined it in the initState() function of the app.
But when later using that variable in the Where clause of the Cloud Firestore query, the query doesn't work:
.where("email", isEqualTo: _userEmail.toString())
Instead, the query works when used with quotes:
.where("email", isEqualTo: "[email protected]")
Firestore.instance.collection('Matrimonial').where("email", isEqualTo: _userEmail.toString()).getDocuments();
Not Working
Firestore.instance.collection('Matrimonial').where("email", isEqualTo: "[email protected]").getDocuments();
Working
setStatemethod