Compare commits

..

2 commits

Author SHA1 Message Date
ee25bba5b8
butter menu buttons 2023-06-02 13:06:48 +02:00
ac37a352ea
floating next button 2023-06-02 13:04:50 +02:00
2 changed files with 18 additions and 12 deletions

View file

@ -148,6 +148,12 @@ class _QuizPageState extends State<QuizPage> {
],
),
),
floatingActionButton: askState != -1
? FloatingActionButton.extended(
onPressed: _nextQuestion,
icon: const Icon(Icons.chevron_right),
label: const Text("Next"))
: null,
);
}
}

View file

@ -107,6 +107,11 @@ class MainPageState extends State<MainPage> {
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<MainPage> {
Navigator.of(context).pop();
},
),
TextButton(
onPressed: () {
Navigator.of(context).pop();
},
child: const Text('Cancle'))
],
);
},
@ -143,6 +143,11 @@ class MainPageState extends State<MainPage> {
'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<MainPage> {
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<String, dynamic> json) {