mirror of
https://github.com/immich-app/immich.git
synced 2025-12-24 09:14:58 +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:
@@ -19,29 +19,23 @@ class LockedPage extends HookConsumerWidget {
|
||||
final showOverlay = useState(false);
|
||||
final authProviderNotifier = ref.read(authProvider.notifier);
|
||||
// lock the page when it is destroyed
|
||||
useEffect(
|
||||
() {
|
||||
return () {
|
||||
authProviderNotifier.lockPinCode();
|
||||
};
|
||||
},
|
||||
[],
|
||||
);
|
||||
useEffect(() {
|
||||
return () {
|
||||
authProviderNotifier.lockPinCode();
|
||||
};
|
||||
}, []);
|
||||
|
||||
useEffect(
|
||||
() {
|
||||
if (context.mounted) {
|
||||
if (appLifeCycle == AppLifecycleState.resumed) {
|
||||
showOverlay.value = false;
|
||||
} else {
|
||||
showOverlay.value = true;
|
||||
}
|
||||
useEffect(() {
|
||||
if (context.mounted) {
|
||||
if (appLifeCycle == AppLifecycleState.resumed) {
|
||||
showOverlay.value = false;
|
||||
} else {
|
||||
showOverlay.value = true;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
},
|
||||
[appLifeCycle],
|
||||
);
|
||||
return null;
|
||||
}, [appLifeCycle]);
|
||||
|
||||
return Scaffold(
|
||||
appBar: ref.watch(multiselectProvider) ? null : const LockPageAppBar(),
|
||||
@@ -51,12 +45,7 @@ class LockedPage extends HookConsumerWidget {
|
||||
renderListProvider: lockedTimelineProvider,
|
||||
topWidget: Padding(
|
||||
padding: const EdgeInsets.all(16.0),
|
||||
child: Center(
|
||||
child: Text(
|
||||
'no_locked_photos_message'.tr(),
|
||||
style: context.textTheme.labelLarge,
|
||||
),
|
||||
),
|
||||
child: Center(child: Text('no_locked_photos_message'.tr(), style: context.textTheme.labelLarge)),
|
||||
),
|
||||
editEnabled: false,
|
||||
favoriteEnabled: false,
|
||||
@@ -84,9 +73,7 @@ class LockPageAppBar extends ConsumerWidget implements PreferredSizeWidget {
|
||||
),
|
||||
centerTitle: true,
|
||||
automaticallyImplyLeading: false,
|
||||
title: const Text(
|
||||
'locked_folder',
|
||||
).tr(),
|
||||
title: const Text('locked_folder').tr(),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -23,18 +23,12 @@ class PinAuthPage extends HookConsumerWidget {
|
||||
final isBetaTimeline = Store.isBetaTimelineEnabled;
|
||||
|
||||
Future<void> registerBiometric(String pinCode) async {
|
||||
final isRegistered = await ref.read(localAuthProvider.notifier).registerBiometric(
|
||||
context,
|
||||
pinCode,
|
||||
);
|
||||
final isRegistered = await ref.read(localAuthProvider.notifier).registerBiometric(context, pinCode);
|
||||
|
||||
if (isRegistered) {
|
||||
context.showSnackBar(
|
||||
SnackBar(
|
||||
content: Text(
|
||||
'biometric_auth_enabled'.tr(),
|
||||
style: context.textTheme.labelLarge,
|
||||
),
|
||||
content: Text('biometric_auth_enabled'.tr(), style: context.textTheme.labelLarge),
|
||||
duration: const Duration(seconds: 3),
|
||||
backgroundColor: context.colorScheme.primaryContainer,
|
||||
),
|
||||
@@ -79,20 +73,14 @@ class PinAuthPage extends HookConsumerWidget {
|
||||
}
|
||||
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: Text('locked_folder'.tr()),
|
||||
),
|
||||
appBar: AppBar(title: Text('locked_folder'.tr())),
|
||||
body: ListView(
|
||||
shrinkWrap: true,
|
||||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(top: 36.0),
|
||||
child: showPinRegistrationForm.value
|
||||
? Center(
|
||||
child: PinRegistrationForm(
|
||||
onDone: () => showPinRegistrationForm.value = false,
|
||||
),
|
||||
)
|
||||
? Center(child: PinRegistrationForm(onDone: () => showPinRegistrationForm.value = false))
|
||||
: Column(
|
||||
children: [
|
||||
Center(
|
||||
@@ -112,17 +100,11 @@ class PinAuthPage extends HookConsumerWidget {
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(right: 16.0),
|
||||
child: TextButton.icon(
|
||||
icon: const Icon(
|
||||
Icons.fingerprint,
|
||||
size: 28,
|
||||
),
|
||||
icon: const Icon(Icons.fingerprint, size: 28),
|
||||
onPressed: enableBiometricAuth,
|
||||
label: Text(
|
||||
'use_biometric'.tr(),
|
||||
style: context.textTheme.labelLarge?.copyWith(
|
||||
color: context.primaryColor,
|
||||
fontSize: 18,
|
||||
),
|
||||
style: context.textTheme.labelLarge?.copyWith(color: context.primaryColor, fontSize: 18),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user