align column in center 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: flutter column widget vertical center

Column(
  mainAxisAlignment: MainAxisAlignment.center,
  crossAxisAlignment: CrossAxisAlignment.center,
  children:children,
)

Example 3: flutter column

Column(
  children: <Widget>[
    Text('Deliver features faster'),
    Text('Craft beautiful UIs'),
    Expanded(
      child: FittedBox(
        fit: BoxFit.contain, // otherwise the logo will be tiny
        child: const FlutterLogo(),
      ),
    ),
  ],
)

Example 4: flutter column align

Row(  crossAxisAlignment: CrossAxisAlignment.start,  verticalDirection: VerticalDirection.down,  children: [    Text(      'Flutter',      style: TextStyle(        color: Colors.yellow,        fontSize: 30.0      ),    ),    Text(      'Flutter',      style: TextStyle(          color: Colors.blue,          fontSize: 20.0      ),    ),  ],);

Tags:

Dart Example