Column

data class Column(val width: Constraint = Constraint.Wrap, val height: Constraint = Constraint.Wrap, val margin: Margin = Margin.Zero, val overflow: Overflow = Overflow.Clip, val horizontalAlignment: CrossAxisAlignment = CrossAxisAlignment.Start, val verticalAlignment: MainAxisAlignment = MainAxisAlignment.Start, val onScroll: (offset: Px) -> Unit? = null, val children: ColumnScope.() -> Unit)

Lays out widgets vertically in a column.

Constructors

Link copied to clipboard
constructor(width: Constraint = Constraint.Wrap, height: Constraint = Constraint.Wrap, margin: Margin = Margin.Zero, overflow: Overflow = Overflow.Clip, horizontalAlignment: CrossAxisAlignment = CrossAxisAlignment.Start, verticalAlignment: MainAxisAlignment = MainAxisAlignment.Start, onScroll: (offset: Px) -> Unit? = null, children: ColumnScope.() -> Unit)

Properties

Link copied to clipboard

A slot to add widgets in.

Link copied to clipboard
val height: Constraint

Sets whether the column's height will wrap its contents (Constraint.Wrap) or match the height of its parent (Constraint.Fill).

Link copied to clipboard
val horizontalAlignment: CrossAxisAlignment

Sets the default horizontal alignment for widgets in this column.

Link copied to clipboard
val margin: Margin

Applies margin (space) around the column.

Link copied to clipboard
val onScroll: (offset: Px) -> Unit? = null

Invoked when the container scrolls. The function's offset is represented in units in the host's coordinate system.

Link copied to clipboard
val overflow: Overflow

Sets whether the column allows scrolling (Overflow.Scroll) if its content overflows its bounds or if it does not allow scrolling (Overflow.Clip).

Link copied to clipboard
val verticalAlignment: MainAxisAlignment

Sets the vertical alignment for widgets in this column.

Link copied to clipboard
val width: Constraint

Sets whether the column's width will wrap its contents (Constraint.Wrap) or match the width of its parent (Constraint.Fill).