Little better (?) formatting for the month values page

This commit is contained in:
broodjeaap 2020-06-11 20:27:54 +02:00
parent 74ac02c621
commit 69e0da8b1e

View file

@ -32,14 +32,14 @@ class MonthValuesPage extends StatelessWidget {
TableRow getMonthTableRow(MapEntry<String, int> month) { TableRow getMonthTableRow(MapEntry<String, int> month) {
return TableRow( return TableRow(
children: [ children: [
TableCell( TableCell(
child: Text(month.key, style: monthTableRowTextStyle) child: Text(month.key, style: monthTableRowTextStyle, textAlign: TextAlign.right)
), ),
TableCell( TableCell(
child: Text(month.value.toString(), style: monthTableRowTextStyle) child: Center(child: Text(month.value.toString(), style: monthTableRowTextStyle))
) )
] ]
); );
} }
@ -51,8 +51,10 @@ class MonthValuesPage extends StatelessWidget {
appBar: AppBar( appBar: AppBar(
title: Text("Month Values") title: Text("Month Values")
), ),
body: Table( body: Center(
children: monthValues.entries.map(getMonthTableRow).toList() child: Table(
children: monthValues.entries.map(getMonthTableRow).toList()
)
) )
), ),
); );