void signIn() async {
String errorMessages ='';
bool status = false;
if(_formkey.currentState.validate()){
Firestore.instance.collection("users").where('email', isEqualTo: this.emailInputController.text).where('password', isEqualTo: this.pwdInputController.text).getDocuments().then((value) => status = true).catchError((err) => status = false);
if(status = true){
Firestore.instance.collection("users").document(this.emailInputController.text)
.get().then((DocumentSnapshot res) => {
if(res["role"] == 2){
print("Manager")
}
else if(res["role"] == 3){
print("Umpire")
}
});
} else {
print("Not done");
}
}
}
Этот код выдает ошибку. Может кто-нибудь помочь мне? Я думаю, что часть firebase работает неправильно.