How to Align content inside a Column Widget to its center or center of the screen?

This Article is posted by seven.srikanth at 10/21/2019 1:41:11 AM



Hope you are looking to achieve the below.
You can do this by using mainAxisAlignment.
mainAxisAlignment: MainAxisAlignment.center,
Here is a detailed example class,
class Welcome extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            Text('Title Text'),
            Text('Description Text'),
          ],
        ),
      )
    );
  }
}
Thanks,
Srikanth

Tags:








0 Comments
Login to comment.
Recent Comments

Be the first to Comment. You can ask a Query or Share your toughts or Just say thanks.


© 2018 - Fluttercentral | Email to me - seven.srikanth@gmail.com