FirebaseAuth.instance.createUserWithEmailAndPassword(email: _email, password: _password).then((user) {
// do whatever you want to do with new user object
}).catchError((e) {
print(e.details); // code, message, details
});
如果电子邮件存在,它将触发 catchError . 它's worth noting that ' details ' is the human readable error getter. ' code ' and ' message'对最终用户没用,但这些只是firebase_auth中记录的两个 .
1 回答
firebase会将该信息作为错误消息返回:
如果电子邮件存在,它将触发
catchError
. 它's worth noting that ' details ' is the human readable error getter. ' code ' and ' message'对最终用户没用,但这些只是firebase_auth中记录的两个 .