From ff95e415d23d4732bda1e8cfb5165d035260c4a7 Mon Sep 17 00:00:00 2001 From: BroodjeAap Date: Sat, 5 Dec 2020 17:05:24 +0100 Subject: [PATCH] Added styling to 'finished practice' dialog title --- lib/pages/practice/PracticePage.dart | 5 ++- .../instructions/YearInstructionDialog.dart | 43 +++++++++++++++++++ 2 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 lib/pages/practice/instructions/YearInstructionDialog.dart diff --git a/lib/pages/practice/PracticePage.dart b/lib/pages/practice/PracticePage.dart index 5fe84cc..ed21531 100644 --- a/lib/pages/practice/PracticePage.dart +++ b/lib/pages/practice/PracticePage.dart @@ -112,7 +112,10 @@ class _PracticeState extends State { SimpleDialog finishedPracticeDialog() { return SimpleDialog( - title: Text("Practice Complete!"), + title: Text( + "Practice Complete!", + style: TextStyle(fontSize: 25, color: Colors.blue) + ), contentPadding: EdgeInsets.all(50), children: [ Row( diff --git a/lib/pages/practice/instructions/YearInstructionDialog.dart b/lib/pages/practice/instructions/YearInstructionDialog.dart new file mode 100644 index 0000000..d2f57ad --- /dev/null +++ b/lib/pages/practice/instructions/YearInstructionDialog.dart @@ -0,0 +1,43 @@ +import 'package:flutter/material.dart'; +import 'package:ohthatsa/util/Months.dart'; + +TableRow getMonthTableRow(MapEntry month) { + return TableRow( + children: [ + TableCell( + child: Text( + month.key, + style: TextStyle(fontSize: 25), + textAlign: TextAlign.right + ) + ), + TableCell( + child: Text( + month.value.value.toString(), + style: TextStyle(fontSize: 25), + textAlign: TextAlign.center + ) + ) + ] + ); +} + +SimpleDialog getMonthInstructionDialog(){ + return SimpleDialog( + title: Text( + "Month Instructions", + style: TextStyle(fontSize: 25, color: Colors.blue), + ), + children: [ + Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Text("Memorize these values for every month"), + Table( + children: Months.stringMap.entries.map(getMonthTableRow).toList() + ) + ] + ) + ], + ); +} \ No newline at end of file