From ee25bba5b8dddf9445747d26c08b31a7e0249e33 Mon Sep 17 00:00:00 2001 From: jusax23 Date: Fri, 2 Jun 2023 13:06:48 +0200 Subject: [PATCH] butter menu buttons --- lib/main.dart | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/lib/main.dart b/lib/main.dart index a4ab49d..0463ec5 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -107,6 +107,11 @@ class MainPageState extends State { Text('Do you want to reset „${v.name}“ Vault?'), actions: [ TextButton( + onPressed: () { + Navigator.of(context).pop(); + }, + child: const Text('Cancel')), + FilledButton( child: const Text('Reset'), onPressed: () { setState(() { @@ -117,11 +122,6 @@ class MainPageState extends State { Navigator.of(context).pop(); }, ), - TextButton( - onPressed: () { - Navigator.of(context).pop(); - }, - child: const Text('Cancle')) ], ); }, @@ -143,6 +143,11 @@ class MainPageState extends State { 'Do you want to delete „${v.name}“ Vault?'), actions: [ TextButton( + onPressed: () { + Navigator.of(context).pop(); + }, + child: const Text('Cancel')), + FilledButton( child: const Text('Delete'), onPressed: () { setState(() { @@ -154,11 +159,6 @@ class MainPageState extends State { Navigator.of(context).pop(); }, ), - TextButton( - onPressed: () { - Navigator.of(context).pop(); - }, - child: const Text('Cancle')) ], ); }, @@ -321,9 +321,9 @@ class Vault { return (min, total.toDouble() / questions.length, max); } - String txtVals(){ + String txtVals() { var (min, avg, max) = vals(); - return '($min, ${(avg*100).round()/100.0}, $max)'; + return '($min, ${(avg * 100).round() / 100.0}, $max)'; } factory Vault.fromJson(Map json) {