Commit 20cdaf56 authored by Ilham Maulana's avatar Ilham Maulana 💻

fix: invalidUsernameOrPassword to false after success login

parent a7aeb206
......@@ -61,6 +61,7 @@ class AuthProvider with ChangeNotifier {
validateToken();
}
invalidUsernameOrPassword = false;
debugPrint("Login successful $token");
} else if (response.statusCode == 401) {
invalidUsernameOrPassword = true;
......@@ -94,6 +95,7 @@ class AuthProvider with ChangeNotifier {
validateToken();
}
invalidUsernameOrPassword = false;
debugPrint("Login successful $token");
} else if (response.statusCode == 401) {
invalidUsernameOrPassword = true;
......@@ -413,4 +415,15 @@ class AuthProvider with ChangeNotifier {
}
}
}
bool onAdminLogin = false;
void setAdminLoginOn() {
onAdminLogin = true;
notifyListeners();
}
void setAdminLoginOff() {
onAdminLogin = false;
notifyListeners();
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment