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,10 +4,10 @@ import 'package:immich_mobile/extensions/build_context_extensions.dart';
class DisableMultiSelectButton extends ConsumerWidget {
const DisableMultiSelectButton({
Key? key,
super.key,
required this.onPressed,
required this.selectedItemCount,
}) : super(key: key);
});
final Function onPressed;
final int selectedItemCount;

View file

@ -57,7 +57,7 @@ class DraggableScrollbar extends StatefulWidget {
final Function(bool scrolling) scrollStateListener;
DraggableScrollbar.semicircle({
Key? key,
super.key,
Key? scrollThumbKey,
this.alwaysVisibleScrollThumb = false,
required this.child,
@ -76,8 +76,7 @@ class DraggableScrollbar extends StatefulWidget {
heightScrollThumb * 0.6,
scrollThumbKey,
alwaysVisibleScrollThumb,
),
super(key: key);
);
@override
DraggableScrollbarState createState() => DraggableScrollbarState();
@ -170,12 +169,12 @@ class ScrollLabel extends StatelessWidget {
BoxConstraints.tightFor(width: 72.0, height: 28.0);
const ScrollLabel({
Key? key,
super.key,
required this.child,
required this.animation,
required this.backgroundColor,
this.constraints = _defaultConstraints,
}) : super(key: key);
});
@override
Widget build(BuildContext context) {
@ -509,10 +508,10 @@ class SlideFadeTransition extends StatelessWidget {
final Widget child;
const SlideFadeTransition({
Key? key,
super.key,
required this.animation,
required this.child,
}) : super(key: key);
});
@override
Widget build(BuildContext context) {

View file

@ -9,13 +9,13 @@ import 'package:immich_mobile/modules/settings/services/app_settings.service.dar
class GroupDividerTitle extends HookConsumerWidget {
const GroupDividerTitle({
Key? key,
super.key,
required this.text,
required this.multiselectEnabled,
required this.onSelect,
required this.onDeselect,
required this.selected,
}) : super(key: key);
});
final String text;
final bool multiselectEnabled;

View file

@ -389,15 +389,6 @@ class ImmichAssetGridViewState extends State<ImmichAssetGridView> {
}
}
Future<bool> onWillPop() async {
if (widget.selectionActive && _selectedAssets.isNotEmpty) {
_deselectAll();
return false;
}
return true;
}
@override
void initState() {
super.initState();
@ -438,8 +429,9 @@ class ImmichAssetGridViewState extends State<ImmichAssetGridView> {
@override
Widget build(BuildContext context) {
return WillPopScope(
onWillPop: onWillPop,
return PopScope(
canPop: !(widget.selectionActive && _selectedAssets.isNotEmpty),
onPopInvoked: (didPop) => !didPop ? _deselectAll() : null,
child: Stack(
children: [
_buildAssetGrid(),

View file

@ -23,7 +23,7 @@ class ThumbnailImage extends StatelessWidget {
final int heroOffset;
const ThumbnailImage({
Key? key,
super.key,
required this.asset,
required this.index,
required this.loadAsset,
@ -36,7 +36,7 @@ class ThumbnailImage extends StatelessWidget {
this.onDeselect,
this.onSelect,
this.heroOffset = 0,
}) : super(key: key);
});
@override
Widget build(BuildContext context) {

View file

@ -33,7 +33,7 @@ class ControlBottomAppBar extends ConsumerWidget {
final SelectionAssetState selectionAssetState;
const ControlBottomAppBar({
Key? key,
super.key,
required this.onShare,
this.onFavorite,
this.onArchive,
@ -51,7 +51,7 @@ class ControlBottomAppBar extends ConsumerWidget {
this.enabled = true,
this.unarchive = false,
this.unfavorite = false,
}) : super(key: key);
});
@override
Widget build(BuildContext context, WidgetRef ref) {

View file

@ -6,9 +6,8 @@ import 'package:immich_mobile/extensions/build_context_extensions.dart';
import 'package:immich_mobile/shared/ui/confirm_dialog.dart';
class DeleteDialog extends ConfirmDialog {
const DeleteDialog({Key? key, String? alert, required Function onDelete})
const DeleteDialog({super.key, String? alert, required Function onDelete})
: super(
key: key,
title: "delete_dialog_title",
content: alert ?? "delete_dialog_alert",
cancel: "delete_dialog_cancel",

View file

@ -52,7 +52,7 @@ class DraggableScrollbar extends StatefulWidget {
final bool alwaysVisibleScrollThumb;
DraggableScrollbar({
Key? key,
super.key,
this.alwaysVisibleScrollThumb = false,
required this.heightScrollThumb,
required this.backgroundColor,
@ -64,11 +64,10 @@ class DraggableScrollbar extends StatefulWidget {
this.scrollbarTimeToFade = const Duration(milliseconds: 600),
this.labelTextBuilder,
this.labelConstraints,
}) : assert(child.scrollDirection == Axis.vertical),
super(key: key);
}) : assert(child.scrollDirection == Axis.vertical);
DraggableScrollbar.rrect({
Key? key,
super.key,
Key? scrollThumbKey,
this.alwaysVisibleScrollThumb = false,
required this.child,
@ -82,11 +81,10 @@ class DraggableScrollbar extends StatefulWidget {
this.labelConstraints,
}) : assert(child.scrollDirection == Axis.vertical),
scrollThumbBuilder =
_thumbRRectBuilder(scrollThumbKey, alwaysVisibleScrollThumb),
super(key: key);
_thumbRRectBuilder(scrollThumbKey, alwaysVisibleScrollThumb);
DraggableScrollbar.arrows({
Key? key,
super.key,
Key? scrollThumbKey,
this.alwaysVisibleScrollThumb = false,
required this.child,
@ -100,11 +98,10 @@ class DraggableScrollbar extends StatefulWidget {
this.labelConstraints,
}) : assert(child.scrollDirection == Axis.vertical),
scrollThumbBuilder =
_thumbArrowBuilder(scrollThumbKey, alwaysVisibleScrollThumb),
super(key: key);
_thumbArrowBuilder(scrollThumbKey, alwaysVisibleScrollThumb);
DraggableScrollbar.semicircle({
Key? key,
super.key,
Key? scrollThumbKey,
this.alwaysVisibleScrollThumb = false,
required this.child,
@ -121,8 +118,7 @@ class DraggableScrollbar extends StatefulWidget {
heightScrollThumb * 0.6,
scrollThumbKey,
alwaysVisibleScrollThumb,
),
super(key: key);
);
@override
DraggableScrollbarState createState() => DraggableScrollbarState();
@ -288,12 +284,12 @@ class ScrollLabel extends StatelessWidget {
BoxConstraints.tightFor(width: 72.0, height: 28.0);
const ScrollLabel({
Key? key,
super.key,
required this.child,
required this.animation,
required this.backgroundColor,
this.constraints = _defaultConstraints,
}) : super(key: key);
});
@override
Widget build(BuildContext context) {
@ -625,10 +621,10 @@ class SlideFadeTransition extends StatelessWidget {
final Widget child;
const SlideFadeTransition({
Key? key,
super.key,
required this.animation,
required this.child,
}) : super(key: key);
});
@override
Widget build(BuildContext context) {

View file

@ -1,12 +1,10 @@
import 'package:flutter/material.dart';
import 'package:immich_mobile/shared/ui/confirm_dialog.dart';
class UploadDialog extends ConfirmDialog {
final Function onUpload;
const UploadDialog({Key? key, required this.onUpload})
const UploadDialog({super.key, required this.onUpload})
: super(
key: key,
title: 'upload_dialog_title',
content: 'upload_dialog_info',
cancel: 'upload_dialog_cancel',

View file

@ -20,7 +20,7 @@ import 'package:immich_mobile/shared/ui/immich_loading_indicator.dart';
@RoutePage()
class HomePage extends HookConsumerWidget {
const HomePage({Key? key}) : super(key: key);
const HomePage({super.key});
@override
Widget build(BuildContext context, WidgetRef ref) {