This commit is contained in:
amirrezaghabeli
2025-10-06 08:58:36 +03:30
parent 15f34e7006
commit 0653cdb6d7
21 changed files with 2190 additions and 15 deletions
+6 -2
View File
@@ -147,7 +147,11 @@ class AuthViewModel with ChangeNotifier {
}
Future<void> localLogout() async {
await _authRepository.localLogout();
try {
await _authRepository.localLogout();
} catch (e) {
// Handle local logout exceptions gracefully
}
_loggedInUser = null;
notifyListeners();
}
@@ -160,7 +164,7 @@ class AuthViewModel with ChangeNotifier {
switch (result) {
case Ok<LogoutResponse>():
localLogout();
await localLogout();
break;
case Error<LogoutResponse>():
_errorMessage = result.error.toString();