From 80ad0cdef40b72bdff71ed07f425b5a63beec8bd Mon Sep 17 00:00:00 2001 From: BroodjeAap Date: Sun, 18 Oct 2020 15:12:43 +0200 Subject: [PATCH] Bigger numbers on month practice and capitalizing the month --- lib/pages/practice/month/MonthPracticePage.dart | 10 +++++++--- lib/util/Extensions.dart | 5 +++++ 2 files changed, 12 insertions(+), 3 deletions(-) create mode 100644 lib/util/Extensions.dart diff --git a/lib/pages/practice/month/MonthPracticePage.dart b/lib/pages/practice/month/MonthPracticePage.dart index 958e8f7..a7e319f 100644 --- a/lib/pages/practice/month/MonthPracticePage.dart +++ b/lib/pages/practice/month/MonthPracticePage.dart @@ -3,6 +3,7 @@ import 'package:ohthatsa/pages/practice/month/MonthPracticeSetup.dart'; import 'package:ohthatsa/util/DayCalculator.dart'; import 'package:ohthatsa/AppDrawer.dart'; import 'package:ohthatsa/util/Months.dart'; +import 'package:ohthatsa/util/Extensions.dart'; import "dart:math"; import 'MonthPracticeAnswer.dart'; @@ -64,7 +65,10 @@ class _MonthPracticeState extends State { }, color: Colors.blue, textColor: Colors.white, - child: new Text(i.toString()) + child: new Text( + i.toString(), + style: TextStyle(fontSize: 30) + ) ) ); } @@ -103,7 +107,7 @@ class _MonthPracticeState extends State { ) ), new Text( - (_startCount - _count).toString() + " left", + (_startCount - _count).toString() + " Left", style: TextStyle( fontSize: 20, ) @@ -117,7 +121,7 @@ class _MonthPracticeState extends State { ], ), new Text( - _month.string, + _month.string.capitalize(), style: TextStyle( fontSize: 30, ) diff --git a/lib/util/Extensions.dart b/lib/util/Extensions.dart new file mode 100644 index 0000000..67f9eba --- /dev/null +++ b/lib/util/Extensions.dart @@ -0,0 +1,5 @@ +extension StringExtensions on String { + String capitalize() { + return this[0].toUpperCase() + this.substring(1); + } +} \ No newline at end of file