changes
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user