I can center the DataCell in a DataRow but how do you do it for the DataColumn label?
I want the first DataColumn left justified and the rest centered. Wrapping the label in a Center widget does not take effect.
new DataColumn(
            label: Center(
              child: Text(statName,textAlign: TextAlign.center,
                style: TextStyle(fontSize: 24.0, fontWeight: FontWeight.bold),),
            )
        );

Found how:
DataColumn(
    label: Expanded(
        child: Text(
  'Label',
  textAlign: TextAlign.center,
))),
You may want to wrap the contents of the Label in a Center widget.  There's also an Align widget that uses alignment: Alignment.center and your Text as it's child. 
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With