deps(mobile): flutter 3.16 (#6677)

* dep(mobile): update flutter and deps

* chore: dart analyzer

* chore: update flutter workflow version

* chore: dart format

* fix: gallery_viewer PopScope

---------

Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
This commit is contained in:
shenlong 2024-01-27 16:14:32 +00:00 committed by GitHub
parent 0522058fdf
commit 27488ceb67
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
116 changed files with 627 additions and 624 deletions

View file

@ -4,11 +4,12 @@ import 'package:hooks_riverpod/hooks_riverpod.dart';
import 'package:permission_handler/permission_handler.dart';
class NotificationPermissionNotifier extends StateNotifier<PermissionStatus> {
NotificationPermissionNotifier() :
super(Platform.isAndroid
? PermissionStatus.granted
: PermissionStatus.restricted,
) {
NotificationPermissionNotifier()
: super(
Platform.isAndroid
? PermissionStatus.granted
: PermissionStatus.restricted,
) {
// Sets the initial state
getNotificationPermission().then((p) => state = p);
}
@ -16,9 +17,9 @@ class NotificationPermissionNotifier extends StateNotifier<PermissionStatus> {
/// Requests the notification permission
/// Note: In Android, this is always granted
Future<PermissionStatus> requestNotificationPermission() async {
final permission = await Permission.notification.request();
state = permission;
return permission;
final permission = await Permission.notification.request();
state = permission;
return permission;
}
/// Whether the user has the permission or not
@ -37,8 +38,9 @@ class NotificationPermissionNotifier extends StateNotifier<PermissionStatus> {
Future<bool> hasOrAskForNotificationPermission() {
return requestNotificationPermission().then((p) => p.isGranted);
}
}
final notificationPermissionProvider
= StateNotifierProvider<NotificationPermissionNotifier, PermissionStatus>
((ref) => NotificationPermissionNotifier());
final notificationPermissionProvider =
StateNotifierProvider<NotificationPermissionNotifier, PermissionStatus>(
(ref) => NotificationPermissionNotifier(),
);

View file

@ -9,8 +9,8 @@ import 'package:immich_mobile/modules/settings/services/app_settings.service.dar
class LayoutSettings extends HookConsumerWidget {
const LayoutSettings({
Key? key,
}) : super(key: key);
super.key,
});
@override
Widget build(BuildContext context, WidgetRef ref) {

View file

@ -7,8 +7,8 @@ import 'asset_list_tiles_per_row.dart';
class AssetListSettings extends StatelessWidget {
const AssetListSettings({
Key? key,
}) : super(key: key);
super.key,
});
@override
Widget build(BuildContext context) {

View file

@ -8,8 +8,8 @@ import 'package:immich_mobile/modules/settings/services/app_settings.service.dar
class StorageIndicator extends HookConsumerWidget {
const StorageIndicator({
Key? key,
}) : super(key: key);
super.key,
});
@override
Widget build(BuildContext context, WidgetRef ref) {

View file

@ -8,8 +8,8 @@ import 'package:immich_mobile/modules/settings/services/app_settings.service.dar
class TilesPerRow extends HookConsumerWidget {
const TilesPerRow({
Key? key,
}) : super(key: key);
super.key,
});
@override
Widget build(BuildContext context, WidgetRef ref) {

View file

@ -9,8 +9,8 @@ import 'package:immich_mobile/modules/settings/ui/settings_switch_list_tile.dart
class ImageViewerQualitySetting extends HookConsumerWidget {
const ImageViewerQualitySetting({
Key? key,
}) : super(key: key);
super.key,
});
@override
Widget build(BuildContext context, WidgetRef ref) {

View file

@ -11,8 +11,8 @@ import 'package:permission_handler/permission_handler.dart';
class NotificationSetting extends HookConsumerWidget {
const NotificationSetting({
Key? key,
}) : super(key: key);
super.key,
});
@override
Widget build(BuildContext context, WidgetRef ref) {

View file

@ -9,8 +9,8 @@ import 'package:immich_mobile/utils/immich_app_theme.dart';
class ThemeSetting extends HookConsumerWidget {
const ThemeSetting({
Key? key,
}) : super(key: key);
super.key,
});
@override
Widget build(BuildContext context, WidgetRef ref) {

View file

@ -12,7 +12,7 @@ import 'package:immich_mobile/modules/settings/ui/theme_setting/theme_setting.da
@RoutePage()
class SettingsPage extends HookConsumerWidget {
const SettingsPage({Key? key}) : super(key: key);
const SettingsPage({super.key});
@override
Widget build(BuildContext context, WidgetRef ref) {
@ -43,7 +43,7 @@ class SettingsPage extends HookConsumerWidget {
const LocalStorageSettings(),
const AdvancedSettings(),
],
).toList(),
),
],
),
);