cross axis alignment flutter code example
Example 1: cross axis alignment flutter
crossAxisAlignment: CrossAxisAlignment.center,
Example 2: cross acces alignment in flutter
Row( crossAxisAlignment: CrossAxisAlignment.start, children: [ Container( color: Colors.blue, height: 50.0, width: 50.0, ), Icon(Icons.adjust, size: 50.0, color: Colors.pink), Icon(Icons.adjust, size: 50.0, color: Colors.purple,), Icon(Icons.adjust, size: 50.0, color: Colors.greenAccent,), Container( color: Colors.orange, height: 50.0, width: 50.0, ), Icon(Icons.adjust, size: 50.0, color: Colors.cyan,), ],);
Example 3: align column to center of flex flutter
// If you want the whole table to be Centered, use the mainAxisAlignment property of Column.
///Column
mainAxisAlignment: MainAxisAlignment.center //Center Column contents vertically,
crossAxisAlignment: CrossAxisAlignment.center //Center Column contents horizontally,
///Row
mainAxisAlignment: MainAxisAlignment.center //Center Row contents horizontally,
crossAxisAlignment: CrossAxisAlignment.center //Center Row contents vertically,