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