Skip to content

Column

Lays out its children in a vertical line.

See also: Row for a horizontal line · ListView when the content should scroll.

Learn more: Layout

Import: package:fleury/fleury.dart, or package:fleury/fleury_core.dart in browser code.

Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
const Text('Deploying'),
ProgressBar(value: progress),
],
)

Children take their natural height. Wrap one in Expanded to give it the height left over, or in Flexible to let it take up to a share of it; put a SizedBox(height: …) between children for a fixed gap. A column fills the available height unless mainAxisSize is MainAxisSize.min.

Children that don’t fit are clipped. With assertions enabled, the overflowing edge is marked; make long content scroll with a ListView or ScrollView instead.

ParameterTypeDefaultDescription
mainAxisSize:MainAxisSizeMainAxisSize.maxWhether this widget fills the free space on its main axis (MainAxisSize.max, the default) or shrinks to its children (MainAxisSize.min).
mainAxisAlignment:MainAxisAlignmentMainAxisAlignment.startHow the children are placed along the main axis when there is space left over.
crossAxisAlignment:CrossAxisAlignmentCrossAxisAlignment.startHow the children are placed across the main axis. CrossAxisAlignment.stretch makes them fill it.
children:List<Widget>const []The widgets below this widget in the tree, in layout and paint order.

Column is defined in packages/fleury/lib/src/widgets/basic.dart.

Category: Layout · All widgets