mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00: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:
parent
9b3718120b
commit
e52b9d15b5
643 changed files with 32561 additions and 35292 deletions
|
|
@ -81,43 +81,26 @@ class ControlBottomAppBar extends HookConsumerWidget {
|
|||
final isInLockedView = ref.watch(inLockedViewProvider);
|
||||
|
||||
void minimize() {
|
||||
scrollController.animateTo(
|
||||
bottomPadding,
|
||||
duration: const Duration(milliseconds: 300),
|
||||
curve: Curves.easeOut,
|
||||
);
|
||||
scrollController.animateTo(bottomPadding, duration: const Duration(milliseconds: 300), curve: Curves.easeOut);
|
||||
}
|
||||
|
||||
useEffect(
|
||||
() {
|
||||
controlBottomAppBarNotifier.addListener(minimize);
|
||||
return () {
|
||||
controlBottomAppBarNotifier.removeListener(minimize);
|
||||
};
|
||||
},
|
||||
[],
|
||||
);
|
||||
useEffect(() {
|
||||
controlBottomAppBarNotifier.addListener(minimize);
|
||||
return () {
|
||||
controlBottomAppBarNotifier.removeListener(minimize);
|
||||
};
|
||||
}, []);
|
||||
|
||||
void showForceDeleteDialog(
|
||||
Function(bool) deleteCb, {
|
||||
String? alertMsg,
|
||||
}) {
|
||||
void showForceDeleteDialog(Function(bool) deleteCb, {String? alertMsg}) {
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (BuildContext context) {
|
||||
return DeleteDialog(
|
||||
alert: alertMsg,
|
||||
onDelete: () => deleteCb(true),
|
||||
);
|
||||
return DeleteDialog(alert: alertMsg, onDelete: () => deleteCb(true));
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
void handleRemoteDelete(
|
||||
bool force,
|
||||
Function(bool) deleteCb, {
|
||||
String? alertMsg,
|
||||
}) {
|
||||
void handleRemoteDelete(bool force, Function(bool) deleteCb, {String? alertMsg}) {
|
||||
if (!force) {
|
||||
deleteCb(force);
|
||||
return;
|
||||
|
|
@ -153,11 +136,7 @@ class ControlBottomAppBar extends HookConsumerWidget {
|
|||
if (hasRemote && onDownload != null)
|
||||
ConstrainedBox(
|
||||
constraints: const BoxConstraints(maxWidth: 90),
|
||||
child: ControlBoxButton(
|
||||
iconData: Icons.download,
|
||||
label: "download".tr(),
|
||||
onPressed: onDownload,
|
||||
),
|
||||
child: ControlBoxButton(iconData: Icons.download, label: "download".tr(), onPressed: onDownload),
|
||||
),
|
||||
if (hasLocal && hasRemote && onDelete != null && !isInLockedView)
|
||||
ConstrainedBox(
|
||||
|
|
@ -178,17 +157,10 @@ class ControlBottomAppBar extends HookConsumerWidget {
|
|||
? "control_bottom_app_bar_trash_from_immich".tr()
|
||||
: "control_bottom_app_bar_delete_from_immich".tr(),
|
||||
onPressed: enabled
|
||||
? () => handleRemoteDelete(
|
||||
!trashEnabled,
|
||||
onDeleteServer!,
|
||||
alertMsg: "delete_dialog_alert_remote",
|
||||
)
|
||||
? () => handleRemoteDelete(!trashEnabled, onDeleteServer!, alertMsg: "delete_dialog_alert_remote")
|
||||
: null,
|
||||
onLongPressed: enabled
|
||||
? () => showForceDeleteDialog(
|
||||
onDeleteServer!,
|
||||
alertMsg: "delete_dialog_alert_remote",
|
||||
)
|
||||
? () => showForceDeleteDialog(onDeleteServer!, alertMsg: "delete_dialog_alert_remote")
|
||||
: null,
|
||||
),
|
||||
),
|
||||
|
|
@ -199,10 +171,7 @@ class ControlBottomAppBar extends HookConsumerWidget {
|
|||
iconData: Icons.delete_forever,
|
||||
label: "delete_dialog_title".tr(),
|
||||
onPressed: enabled
|
||||
? () => showForceDeleteDialog(
|
||||
onDeleteServer!,
|
||||
alertMsg: "delete_dialog_alert_remote",
|
||||
)
|
||||
? () => showForceDeleteDialog(onDeleteServer!, alertMsg: "delete_dialog_alert_remote")
|
||||
: null,
|
||||
),
|
||||
),
|
||||
|
|
@ -221,9 +190,7 @@ class ControlBottomAppBar extends HookConsumerWidget {
|
|||
showDialog(
|
||||
context: context,
|
||||
builder: (BuildContext context) {
|
||||
return DeleteLocalOnlyDialog(
|
||||
onDeleteLocal: onDeleteLocal!,
|
||||
);
|
||||
return DeleteLocalOnlyDialog(onDeleteLocal: onDeleteLocal!);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
|
@ -281,13 +248,11 @@ class ControlBottomAppBar extends HookConsumerWidget {
|
|||
label: "upload".tr(),
|
||||
onPressed: enabled
|
||||
? () => showDialog(
|
||||
context: context,
|
||||
builder: (BuildContext context) {
|
||||
return UploadDialog(
|
||||
onUpload: onUpload,
|
||||
);
|
||||
},
|
||||
)
|
||||
context: context,
|
||||
builder: (BuildContext context) {
|
||||
return UploadDialog(onUpload: onUpload);
|
||||
},
|
||||
)
|
||||
: null,
|
||||
),
|
||||
];
|
||||
|
|
@ -325,10 +290,7 @@ class ControlBottomAppBar extends HookConsumerWidget {
|
|||
surfaceTintColor: context.colorScheme.surfaceContainerHigh,
|
||||
elevation: 6.0,
|
||||
shape: const RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.only(
|
||||
topLeft: Radius.circular(12),
|
||||
topRight: Radius.circular(12),
|
||||
),
|
||||
borderRadius: BorderRadius.only(topLeft: Radius.circular(12), topRight: Radius.circular(12)),
|
||||
),
|
||||
margin: const EdgeInsets.all(0),
|
||||
child: CustomScrollView(
|
||||
|
|
@ -349,14 +311,8 @@ class ControlBottomAppBar extends HookConsumerWidget {
|
|||
),
|
||||
),
|
||||
if (hasRemote && !isInLockedView) ...[
|
||||
const Divider(
|
||||
indent: 16,
|
||||
endIndent: 16,
|
||||
thickness: 1,
|
||||
),
|
||||
_AddToAlbumTitleRow(
|
||||
onCreateNewAlbum: enabled ? onCreateNewAlbum : null,
|
||||
),
|
||||
const Divider(indent: 16, endIndent: 16, thickness: 1),
|
||||
_AddToAlbumTitleRow(onCreateNewAlbum: enabled ? onCreateNewAlbum : null),
|
||||
],
|
||||
],
|
||||
),
|
||||
|
|
@ -380,9 +336,7 @@ class ControlBottomAppBar extends HookConsumerWidget {
|
|||
}
|
||||
|
||||
class _AddToAlbumTitleRow extends StatelessWidget {
|
||||
const _AddToAlbumTitleRow({
|
||||
required this.onCreateNewAlbum,
|
||||
});
|
||||
const _AddToAlbumTitleRow({required this.onCreateNewAlbum});
|
||||
|
||||
final VoidCallback? onCreateNewAlbum;
|
||||
|
||||
|
|
@ -393,23 +347,13 @@ class _AddToAlbumTitleRow extends StatelessWidget {
|
|||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
"add_to_album",
|
||||
style: context.textTheme.titleSmall,
|
||||
).tr(),
|
||||
Text("add_to_album", style: context.textTheme.titleSmall).tr(),
|
||||
TextButton.icon(
|
||||
onPressed: onCreateNewAlbum,
|
||||
icon: Icon(
|
||||
Icons.add,
|
||||
color: context.primaryColor,
|
||||
),
|
||||
icon: Icon(Icons.add, color: context.primaryColor),
|
||||
label: Text(
|
||||
"common_create_new_album",
|
||||
style: TextStyle(
|
||||
color: context.primaryColor,
|
||||
fontWeight: FontWeight.bold,
|
||||
fontSize: 14,
|
||||
),
|
||||
style: TextStyle(color: context.primaryColor, fontWeight: FontWeight.bold, fontSize: 14),
|
||||
).tr(),
|
||||
),
|
||||
],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue