|
|
|
|
@ -225,10 +225,6 @@ class _LoginFormState extends State<LoginForm> {
|
|
|
|
|
|
|
|
|
|
login(context, AuthViewModel authProv, Function changeLoadingStata) {
|
|
|
|
|
FocusScopeNode currentFocus = FocusScope.of(context);
|
|
|
|
|
|
|
|
|
|
// if (!currentFocus.hasPrimaryFocus) {
|
|
|
|
|
// currentFocus.unfocus();
|
|
|
|
|
// }
|
|
|
|
|
changeLoadingStata(true);
|
|
|
|
|
if (loginFormKey.currentState.validate()) {
|
|
|
|
|
loginFormKey.currentState.save();
|
|
|
|
|
@ -242,13 +238,10 @@ class _LoginFormState extends State<LoginForm> {
|
|
|
|
|
sharedPref.setString(TOKEN, res['LogInTokenID']);
|
|
|
|
|
print("token" + res['LogInTokenID']);
|
|
|
|
|
Navigator.of(context).pushReplacement(MaterialPageRoute(builder: (BuildContext context) => VerificationMethodsScreen(password: userInfo.password,)));
|
|
|
|
|
// Navigator.of(context).pushReplacementNamed(VERIFICATION_METHODS);
|
|
|
|
|
} else {
|
|
|
|
|
// handel error
|
|
|
|
|
// widget.showCenterShortLoadingToast("watting");
|
|
|
|
|
helpers.showErrorToast(res['ErrorEndUserMessage']);
|
|
|
|
|
}
|
|
|
|
|
// Navigator.of(context).pushNamed(HOME);
|
|
|
|
|
}).catchError((err) {
|
|
|
|
|
print('$err');
|
|
|
|
|
changeLoadingStata(false);
|
|
|
|
|
|