fix log in issue when incorrect password entered
This commit is contained in:
@@ -144,6 +144,7 @@ class _RegisterState extends State<Register> {
|
|||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
} on AuthException catch (error) {
|
} on AuthException catch (error) {
|
||||||
|
Navigator.of(context).pop();
|
||||||
loginError(error.message);
|
loginError(error.message);
|
||||||
emailController.clear();
|
emailController.clear();
|
||||||
passwordController.clear();
|
passwordController.clear();
|
||||||
|
|||||||
@@ -59,21 +59,27 @@ class _SignInState extends State<SignIn> {
|
|||||||
"Authorization": "leatucczyixqwkqqdrhayiwzeofkltds"
|
"Authorization": "leatucczyixqwkqqdrhayiwzeofkltds"
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
//print(response.body[])
|
||||||
if (response.statusCode == 200) {
|
if (response.statusCode == 200) {
|
||||||
|
print(response.body);
|
||||||
var userSignedin = jsonDecode(response.body);
|
var userSignedin = jsonDecode(response.body);
|
||||||
if (userSignedin["status"] == "OK") {
|
if (userSignedin["status"] == "OK") {
|
||||||
|
print("here");
|
||||||
setState(() {
|
setState(() {
|
||||||
successfulSignIn = true;
|
successfulSignIn = true;
|
||||||
});
|
});
|
||||||
|
Navigator.of(context).pop();
|
||||||
} else {
|
} else {
|
||||||
|
Navigator.of(context).pop();
|
||||||
loginError();
|
loginError();
|
||||||
|
passwordController.clear();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} on AuthException {
|
} on AuthException {
|
||||||
|
Navigator.of(context).pop();
|
||||||
loginError();
|
loginError();
|
||||||
passwordController.clear();
|
passwordController.clear();
|
||||||
}
|
}
|
||||||
Navigator.of(context).pop();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void loginError() {
|
void loginError() {
|
||||||
|
|||||||
Reference in New Issue
Block a user