How much space space should be occupied in the main axis.

During a flex layout, available space along the main axis is allocated to children. After allocating space, 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.

See Row, Column, MainAxisAlignment, Flexible.

Constants

max MainAxisSize

Maximize the amount of free space along the main axis, subject to the incoming layout constraints.

If the incoming layout constraints have a small enough BoxConstraints.maxWidth or BoxConstraints.maxHeight, there might still be no free space.

const MainAxisSize(1)
min MainAxisSize

Minimize the amount of free space along the main axis, subject to the incoming layout constraints.

If the incoming layout constraints have a large enough BoxConstraints.minWidth or BoxConstraints.minHeight, there might still be a non-zero amount of free space.

const MainAxisSize(0)
values List<MainAxisSize>

A constant List of the values in this enum, in order of their declaration.

const List<MainAxisSize>

Properties

index int
read-only
hashCode int

Get a hash code for this object.

read-only, inherited
runtimeType Type

A representation of the runtime type of the object.

read-only, inherited

Operators

operator ==(other) bool

The equality operator.

inherited

Methods

noSuchMethod(Invocation invocation) → dynamic

Invoked when a non-existent method or property is accessed.

inherited
toString() String

Returns a string representation of this object.

inherited