diff --git a/lib/screens/filters/filters_tabs_view.dart b/lib/screens/filters/filters_tabs_view.dart index 63e6a4e..f6016e5 100644 --- a/lib/screens/filters/filters_tabs_view.dart +++ b/lib/screens/filters/filters_tabs_view.dart @@ -77,7 +77,7 @@ class _FiltersTabsViewState extends State with TickerProviderSt children: [ const Icon(Icons.verified_user_rounded), const SizedBox(width: 8), - Text(AppLocalizations.of(context)!.whitelists,) + Text(AppLocalizations.of(context)!.whitelists) ], ), ), diff --git a/lib/screens/filters/list_options_menu.dart b/lib/screens/filters/list_options_menu.dart index e2521a3..853eb7c 100644 --- a/lib/screens/filters/list_options_menu.dart +++ b/lib/screens/filters/list_options_menu.dart @@ -26,11 +26,11 @@ class ListOptionsMenu extends StatelessWidget { final String listType; const ListOptionsMenu({ - Key? key, + super.key, required this.list, required this.child, required this.listType, - }) : super(key: key); + }); @override Widget build(BuildContext context) { diff --git a/lib/screens/filters/selection/enable_disable_selection_modal.dart b/lib/screens/filters/selection/enable_disable_selection_modal.dart index 08a9b3d..fdb809c 100644 --- a/lib/screens/filters/selection/enable_disable_selection_modal.dart +++ b/lib/screens/filters/selection/enable_disable_selection_modal.dart @@ -29,7 +29,7 @@ class _EnableDisableSelectionModalState extends State createState() => _SelectionScreenState(); @@ -168,13 +168,17 @@ class _SelectionScreenState extends State with TickerProviderSt Row( children: [ IconButton( - onPressed: enableDisableSelected, - icon: const Icon(Icons.shield_rounded), + onPressed: somethingSelected == true + ? () => enableDisableSelected() + : null, + icon: const Icon(Icons.remove_moderator_rounded), tooltip: AppLocalizations.of(context)!.enableDisableSelected, ), const SizedBox(width: 8), IconButton( - onPressed: deleteSelected, + onPressed: somethingSelected == true + ? () => deleteSelected() + : null, icon: const Icon(Icons.delete_rounded), tooltip: AppLocalizations.of(context)!.deleteSelectedLists, ), @@ -270,7 +274,24 @@ class _SelectionScreenState extends State with TickerProviderSt quantity: _selectedBlacklists.length ), ] - ) + ), + actions: [ + IconButton( + onPressed: somethingSelected == true + ? () => enableDisableSelected() + : null, + icon: const Icon(Icons.remove_moderator_rounded), + tooltip: AppLocalizations.of(context)!.enableDisableSelected, + ), + IconButton( + onPressed: somethingSelected == true + ? () => deleteSelected() + : null, + icon: const Icon(Icons.delete_rounded), + tooltip: AppLocalizations.of(context)!.deleteSelectedLists, + ), + const SizedBox(width: 8), + ], ), ) ]; @@ -296,41 +317,7 @@ class _SelectionScreenState extends State with TickerProviderSt ) ) ), - AnimatedPositioned( - duration: const Duration(milliseconds: 200), - curve: Curves.ease, - right: 16, - bottom: _isScrolled ? -150 : 16, - child: Column( - children: [ - FloatingActionButton.small( - onPressed: somethingSelected == true - ? () => enableDisableSelected() - : null, - tooltip: AppLocalizations.of(context)!.enableDisableSelected, - child: Icon( - Icons.shield_rounded, - color: somethingSelected == true - ? Theme.of(context).colorScheme.onPrimaryContainer - : Theme.of(context).colorScheme.onPrimaryContainer.withOpacity(0.5), - ), - ), - const SizedBox(height: 16), - FloatingActionButton.small( - onPressed: somethingSelected == true - ? () => deleteSelected() - : null, - tooltip: AppLocalizations.of(context)!.deleteSelected, - child: Icon( - Icons.delete_rounded, - color: somethingSelected == true - ? Theme.of(context).colorScheme.onPrimaryContainer - : Theme.of(context).colorScheme.onPrimaryContainer.withOpacity(0.5), - ), - ), - ], - ), - ) + ], ), ); @@ -344,11 +331,10 @@ class _Tab extends StatelessWidget { final int quantity; const _Tab({ - Key? key, required this.icon, required this.text, required this.quantity - }) : super(key: key); + }); @override Widget build(BuildContext context) { diff --git a/lib/widgets/options_modal.dart b/lib/widgets/options_modal.dart index 4128fb2..75a55a5 100644 --- a/lib/widgets/options_modal.dart +++ b/lib/widgets/options_modal.dart @@ -8,9 +8,9 @@ class OptionsModal extends StatelessWidget { final List options; const OptionsModal({ - Key? key, + super.key, required this.options, - }) : super(key: key); + }); @override Widget build(BuildContext context) { @@ -32,16 +32,22 @@ class OptionsModal extends StatelessWidget { ) ], ), - content: Column( - mainAxisSize: MainAxisSize.min, - children: options.map((opt) => CustomListTileDialog( - title: opt.title, - icon: opt.icon, - onTap: () { - Navigator.pop(context); - opt.action(); - }, - )).toList() + content: ConstrainedBox( + constraints: const BoxConstraints( + maxWidth: 400 + ), + child: SingleChildScrollView( + child: Wrap( + children: options.map((opt) => CustomListTileDialog( + title: opt.title, + icon: opt.icon, + onTap: () { + Navigator.pop(context); + opt.action(); + }, + )).toList() + ), + ), ), actions: [ Row(