🐛 Fixes render errors of unauthorized

This commit is contained in:
2025-07-03 00:49:11 +08:00
parent 2eba871a6d
commit a20c2598fc
10 changed files with 91 additions and 65 deletions

View File

@ -18,8 +18,13 @@ class UserInfoNotifier extends StateNotifier<AsyncValue<SnAccount?>> {
final user = SnAccount.fromJson(response.data);
state = AsyncValue.data(user);
} catch (error, stackTrace) {
log("[UserInfo] Failed to fetch user info: $error");
state = AsyncValue.error(error, stackTrace);
log(
"[UserInfo] Failed to fetch user info...",
name: 'UserInfoNotifier',
error: error,
stackTrace: stackTrace,
);
state = AsyncValue.data(null);
}
}