Column class
Lays out its children in a vertical line.
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.
- Inheritance
- Available extensions
Constructors
-
Column({Key? key, MainAxisSize mainAxisSize = MainAxisSize.max, MainAxisAlignment mainAxisAlignment = MainAxisAlignment.start, CrossAxisAlignment crossAxisAlignment = CrossAxisAlignment.start, List<
Widget> children = const []}) -
const
Properties
-
children
→ List<
Widget> -
The widgets below this widget in the tree, in layout and paint order.
finalinherited
- crossAxisAlignment → CrossAxisAlignment
-
How the children are placed across the main axis.
CrossAxisAlignment.stretch makes them fill it.
finalinherited
- direction → Axis
-
The axis the children are laid out along.
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
finalinherited
- mainAxisAlignment → MainAxisAlignment
-
How the children are placed along the main axis when there is space
left over.
finalinherited
- mainAxisSize → MainAxisSize
-
Whether this widget fills the free space on its main axis
(MainAxisSize.max, the default) or shrinks to its children
(MainAxisSize.min).
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
animate(
{Duration? duration, Curve? curve, Object? trigger, bool repeat = false}) → Animate -
Available on Widget, provided by the AnimateExtension extension
Starts an Animate chain over this widget.duration/curveapply to the whole chain. With notriggerit plays on mount; with a non-null trigger it rests on mount and replays whenever the token changes. -
createElement(
) → MultiChildRenderObjectElement -
Creates the Element that will mount this widget into the tree.
inherited
-
createRenderObject(
BuildContext context) → RenderObject -
Creates the render object backing this widget. Called once when the
element first mounts.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
updateRenderObject(
BuildContext context, covariant RenderFlex renderObject) → void -
Applies any changes from a new widget instance to the existing
render object. Default is a no-op; subclasses override when the
widget carries layout/paint configuration.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited