I'm using flutter table. I would like to set numbers align right.(or center)
How can I make them locate?
I would like to header center. numbers to right.
Container(
margin: EdgeInsets.all(8.0),
width: double.infinity,
decoration: BoxDecoration(border: Border.all(width: 1.0)),
child: Table(
columnWidths: {
0: FlexColumnWidth(1),
1: FlexColumnWidth(1),
2: FlexColumnWidth(4),
3: FlexColumnWidth(1),
4: FlexColumnWidth(1),
5: FlexColumnWidth(1),
6: FlexColumnWidth(1),
},
border: TableBorder.all(),
defaultVerticalAlignment: TableCellVerticalAlignment.middle,
children: <TableRow>[
TableRow(children: <Widget>[
Container(
padding: EdgeInsets.all(2.0),
child: Text('G',
style: TextStyle(fontWeight: FontWeight.bold)),
),
Container(
padding: EdgeInsets.all(2.0),
child: Text('A',
style: TextStyle(fontWeight: FontWeight.bold)),
),
]
),
TableRow(children: <Widget>[
Container(
padding: EdgeInsets.all(2.0),
child: Text('2'),
),
Container(
padding: EdgeInsets.all(2.0),
child: Text('FW'),
),
]
)
Too much code, then I wrote some of codes. Please take a look.