I\'d like to know how to center the contents of a Text widget vertically and horizontally in Flutter. I only know how to center the widget itself using Center(child: T
Center(child: T
Text alignment center property setting only horizontal alignment.
I used below code to set text vertically and horizontally center.
Code:
child: Center( child: Text( "Hello World", textAlign: TextAlign.center, ), ),