email already notice

This commit is contained in:
niuhuan 2021-11-21 00:02:33 +08:00
parent bf53612c42
commit a0f2c9377e
1 changed files with 5 additions and 1 deletions

View File

@ -72,7 +72,11 @@ class _RegisterScreenState extends State<RegisterScreen> {
_registerOver = true;
});
} catch (e) {
alertDialog(context, "注册失败", "$e");
String message = "$e";
if (message.contains("email is already exist")) {
message = "账号已存在";
}
alertDialog(context, "注册失败", message);
} finally {
setState(() {
_registering = false;