mainAxisSize property

  1. @override
MainAxisSize get mainAxisSize
override

How much space should be occupied in the main axis.

After allocating space to children, there might be some remaining free space. This value controls whether to maximize or minimize the amount of free space, subject to the incoming layout constraints.

If some children have a non-zero flex factors (and none have a fit of FlexFit.loose), they will expand to consume all the available space and there will be no remaining free space to maximize or minimize, making this value irrelevant to the final layout.

Implementation

@override
MainAxisSize get mainAxisSize => _mainAxisSize;
  1. @override
set mainAxisSize (MainAxisSize value)
override

Implementation

@override
set mainAxisSize(MainAxisSize value) {
  assert(value != null);
  if (_mainAxisSize != value) {
    _mainAxisSize = value;
    markNeedsLayout();
  }
}