Normalize order of text buttons in popups

Closes #12
This commit is contained in:
Lea 2023-02-05 17:42:59 +01:00
parent 30904ecc21
commit 703068082e
Signed by: Lea
GPG key ID: 1BAFFE8347019C42
2 changed files with 16 additions and 15 deletions

View file

@ -285,6 +285,12 @@ class _MyHomePageState extends State<MyHomePage> {
content: const Text(
"Are you sure you want to log out?"),
actions: [
TextButton(
onPressed: () {
Navigator.pop(context);
},
child: const Text("Nevermind"),
),
TextButton(
onPressed: () async {
Navigator.pop(context);
@ -297,12 +303,6 @@ class _MyHomePageState extends State<MyHomePage> {
});
},
child: const Text("Do it!")),
TextButton(
onPressed: () {
Navigator.pop(context);
},
child: const Text("Nevermind"),
),
],
),
),

View file

@ -69,6 +69,16 @@ class _FilterMenuState extends State<FilterMenu> {
Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
TextButton(
onPressed: () {
setState(() {
_checked.forEach((key, value) {
_checked[key] = false;
});
});
},
child: const Text("Reset")
),
TextButton(
onPressed: () {
List<int> items = _checked.keys
@ -80,15 +90,6 @@ class _FilterMenuState extends State<FilterMenu> {
},
child: const Text("Done"),
),
TextButton(
onPressed: () {
setState(() {
_checked.forEach((key, value) {
_checked[key] = false;
});
});
},
child: const Text("Reset")),
],
)
],