flutter rows and columns code example

Example 1: center row content flutter

mainAxisAlignment: MainAxisAlignment.center //Center Row contents horizontally,
crossAxisAlignment: CrossAxisAlignment.center //Center Row contents vertically,

Example 2: flutter center row

mainAxisAlignment: MainAxisAlignment.center //Center Column contents vertically,

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,

Tags:

Dart Example