feat(mobile): move buttons in the bottom sheet to the kebabu menu (#24175)

* refactor: remove bottom sheet buttons

* feat: add iconOnly and menuItem parameters to action buttons

* feat: enhance action button context and kebab menu integration

* feat: use ActionButtonContext

* fix: add missing options in some cases

---------

Co-authored-by: Alex <alex.tran1502@gmail.com>
This commit is contained in:
idubnori
2025-12-16 07:44:27 +09:00
committed by GitHub
parent 77926383db
commit b10a8baf53
19 changed files with 274 additions and 158 deletions

View File

@@ -18,7 +18,15 @@ import 'package:immich_mobile/widgets/common/immich_toast.dart';
class DeleteActionButton extends ConsumerWidget {
final ActionSource source;
final bool showConfirmation;
const DeleteActionButton({super.key, required this.source, this.showConfirmation = false});
final bool iconOnly;
final bool menuItem;
const DeleteActionButton({
super.key,
required this.source,
this.showConfirmation = false,
this.iconOnly = false,
this.menuItem = false,
});
void _onTap(BuildContext context, WidgetRef ref) async {
if (!context.mounted) {
@@ -74,6 +82,8 @@ class DeleteActionButton extends ConsumerWidget {
maxWidth: 110.0,
iconData: Icons.delete_sweep_outlined,
label: "delete".t(context: context),
iconOnly: iconOnly,
menuItem: menuItem,
onPressed: () => _onTap(context, ref),
);
}