mainAxisAlignment property

  1. @override
MainAxisAlignment mainAxisAlignment
override

How the children should be placed along the main axis.

If the direction is Axis.horizontal, and the mainAxisAlignment is either MainAxisAlignment.start or MainAxisAlignment.end, then the textDirection must not be null.

If the direction is Axis.vertical, and the mainAxisAlignment is either MainAxisAlignment.start or MainAxisAlignment.end, then the verticalDirection must not be null.

Implementation

@override
MainAxisAlignment get mainAxisAlignment => _mainAxisAlignment;
  1. @override
void mainAxisAlignment=(MainAxisAlignment value)
override

Implementation

@override
set mainAxisAlignment(MainAxisAlignment value) {
  assert(value != null);
  if (_mainAxisAlignment != value) {
    _mainAxisAlignment = value;
    markNeedsLayout();
  }
}