chore: bump dart sdk to 3.8 (#20355)

* chore: bump dart sdk to 3.8

* chore: make build

* make pigeon

* chore: format files

---------

Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
This commit is contained in:
shenlong 2025-07-29 00:34:03 +05:30 committed by GitHub
parent 9b3718120b
commit e52b9d15b5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
643 changed files with 32561 additions and 35292 deletions

View file

@ -49,16 +49,16 @@ class AuthNotifier extends StateNotifier<AuthState> {
this._secureStorageService,
this._widgetService,
) : super(
const AuthState(
deviceId: "",
userId: "",
userEmail: "",
name: '',
profileImagePath: '',
isAdmin: false,
isAuthenticated: false,
),
);
const AuthState(
deviceId: "",
userId: "",
userEmail: "",
name: '',
profileImagePath: '',
isAdmin: false,
isAuthenticated: false,
),
);
Future<String> validateServerUrl(String url) {
return _authService.validateServerUrl(url);
@ -118,15 +118,10 @@ class AuthNotifier extends StateNotifier<AuthState> {
}
}
Future<bool> saveAuthInfo({
required String accessToken,
}) async {
Future<bool> saveAuthInfo({required String accessToken}) async {
await _apiService.setAccessToken(accessToken);
await _widgetService.writeCredentials(
Store.get(StoreKey.serverEndpoint),
accessToken,
);
await _widgetService.writeCredentials(Store.get(StoreKey.serverEndpoint), accessToken);
// Get the deviceid from the store if it exists, otherwise generate a new one
String deviceId = Store.tryGet(StoreKey.deviceId) ?? await FlutterUdid.consistentUdid;
@ -150,21 +145,12 @@ class AuthNotifier extends StateNotifier<AuthState> {
_log.severe("Unauthorized access, token likely expired. Logging out.");
return false;
}
_log.severe(
"Error getting user information from the server [API EXCEPTION]",
stackTrace,
);
_log.severe("Error getting user information from the server [API EXCEPTION]", stackTrace);
} catch (error, stackTrace) {
_log.severe(
"Error getting user information from the server [CATCH ALL]",
error,
stackTrace,
);
_log.severe("Error getting user information from the server [CATCH ALL]", error, stackTrace);
if (kDebugMode) {
debugPrint(
"Error getting user information from the server [CATCH ALL] $error $stackTrace",
);
debugPrint("Error getting user information from the server [CATCH ALL] $error $stackTrace");
}
}