Skip to content

Commit

Permalink
Added two options to multi list mode's menu
Browse files Browse the repository at this point in the history
as requested issue Albert221#99, added options to "undone all done" and "remove all done" to the multiple list mode aswell
  • Loading branch information
Lovasz-Akos committed Jul 24, 2022
1 parent 5af8fc8 commit cf6c7c5
Showing 1 changed file with 20 additions and 6 deletions.
26 changes: 20 additions & 6 deletions lib/features/items/widgets/app_bar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,26 @@ class ItemsAppBar extends StatelessWidget implements PreferredSizeWidget {
onSelected: (item) => _onMenuItemSelected(context, item),
itemBuilder: (context) => [
if (shoppingListsMode == ShoppingListsMode.multiple)
_PopupMenuItem(
value: _MenuItem.archiveList,
enabled: onArchiveList != null,
icon: const Icon(Icons.archive),
label: Text(S.of(context)!.menu_archive_list),
)
[
_PopupMenuItem(
value: _MenuItem.archiveList,
enabled: onArchiveList != null,
icon: const Icon(Icons.archive),
label: Text(S.of(context)!.menu_archive_list),
),
_PopupMenuItem(
value: _MenuItem.undoneAll,
enabled: onUndoneAll != null,
icon: const Icon(Icons.remove_done),
label: Text(S.of(context)!.menu_undone_all_done),
),
_PopupMenuItem(
value: _MenuItem.removeAllDone,
enabled: onRemoveAllDone != null,
icon: const Icon(Icons.delete),
label: Text(S.of(context)!.menu_remove_all_done),
)
]
else ...[
_PopupMenuItem(
value: _MenuItem.undoneAll,
Expand Down

0 comments on commit cf6c7c5

Please sign in to comment.