center text container flutter code example
Example 1: flutter column center horizontal text
Center(
child: Column(
mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Text('You are at center!'),
],
),
),
Example 2: how to align text in center in flutter container
Container(
child: Align(
alignment: Alignment.center,
child: Text(
'Some text here',
style: TextStyle(
),
),
),
),