Skip to content

Commit

Permalink
change save & clear behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
Codel1417 committed Jun 1, 2024
1 parent c12f999 commit 5bc2d75
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions lib/Frontend/pages/action_selector.dart
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,22 @@ class _ActionSelectorState extends ConsumerState<ActionSelector> {
title: Text(actionsSelectScreen()),
actions: [
IconButton(
onPressed: () => context.pop(selected),
onPressed: () {
if (selected.isEmpty) {
context.pop(true);
} else {
context.pop(selected);
}
},
icon: const Icon(Icons.save),
tooltip: triggersSelectSaveLabel(),
),
IconButton(
onPressed: () => context.pop(true),
onPressed: () {
setState(() {
selected.clear();
});
},
icon: const Icon(Icons.clear),
tooltip: triggersSelectClearLabel(),
)
Expand Down

0 comments on commit 5bc2d75

Please sign in to comment.