請幫幫我。我有這個錯誤。10Q
未處理的例外:NoSuchMethodError:類“FirebaseAuthException”沒有實體獲取器“_message”。E/flutter(5700):接收方:“FirebaseAuthException”實體 E/flutter(5700):嘗試呼叫:_message
await _auth
.signInWithEmailAndPassword(
email: _emailTextEditingController.text.trim(),
password: _passwordTextEditingController.text.trim(),
)
.then((authUser) {
setState(() {
firebaseUser = authUser.user;
});
}).catchError((error) {
showDialog(
context: context,
builder: (c) {
return ErrorAlertDialog(
message: error._message == '[firebase_auth/user-not-found] There is no user record corresponding to this identifier. The user may have been deleted.'
? 'Email or password incorrect' : 'Error',
);
});
});
error._message == '[firebase_auth/user-not-found] There is no user record corresponding to this identifier. The user may have been deleted.'
? 'Email or password incorrect' : 'Error',
uj5u.com熱心網友回復:
有人告訴您,FirebaseAuthException 沒有名為 _message 的 getter。如果您查看該類的代碼或檔案(此處)并查看您可以使用的方法,_message 不是一個。
那里有一個(getErrorCode),您應該可以更輕松地進行比較。
uj5u.com熱心網友回復:
我認為 _message 是在 null 上呼叫的,對此我不確定。
轉載請註明出處,本文鏈接:https://www.uj5u.com/gongcheng/530966.html
