mirror of
https://github.com/immich-app/immich.git
synced 2025-12-18 01:11:07 +03:00
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:
@@ -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");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user