fix warning

This commit is contained in:
shenlong-tanwen 2025-09-08 10:03:43 +05:30
parent 2e08ba8d70
commit d6de85be27
83 changed files with 357 additions and 269 deletions

View file

@ -1,8 +1,9 @@
import 'dart:async';
import 'package:auto_route/auto_route.dart';
import 'package:flutter/services.dart';
import 'package:immich_mobile/constants/constants.dart';
import 'package:immich_mobile/routing/router.dart';
import 'package:immich_mobile/services/api.service.dart';
import 'package:immich_mobile/services/local_auth.service.dart';
import 'package:immich_mobile/services/secure_storage.service.dart';
@ -30,7 +31,7 @@ class LockedGuard extends AutoRouteGuard {
/// Check if a pincode has been created but this user. Show the form to create if not exist
if (!authStatus.pinCode) {
router.push(PinAuthRoute(createPinCode: true));
unawaited(router.push(PinAuthRoute(createPinCode: true)));
}
if (authStatus.isElevated) {
@ -42,7 +43,7 @@ class LockedGuard extends AutoRouteGuard {
/// the user has enabled the biometric authentication
final securePinCode = await _secureStorageService.read(kSecuredPinCode);
if (securePinCode == null) {
router.push(PinAuthRoute());
unawaited(router.push(PinAuthRoute()));
return;
}
@ -74,7 +75,7 @@ class LockedGuard extends AutoRouteGuard {
} on ApiException {
// PIN code has changed, need to re-enter to access
await _secureStorageService.delete(kSecuredPinCode);
router.push(PinAuthRoute());
unawaited(router.push(PinAuthRoute()));
} catch (error) {
_log.severe("Failed to access locked page", error);
resolver.next(false);