Package-level declarations

Types

Link copied to clipboard
data class Box(val width: Constraint = Constraint.Wrap, val height: Constraint = Constraint.Wrap, val margin: Margin = Margin.Zero, val horizontalAlignment: CrossAxisAlignment = CrossAxisAlignment.Start, val verticalAlignment: CrossAxisAlignment = CrossAxisAlignment.Start, val children: BoxScope.() -> Unit)

Lays out widgets along the z-axis in a column.

Link copied to clipboard
object BoxScope
Link copied to clipboard
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.

Link copied to clipboard
Link copied to clipboard
data class Flex(val value: Double)

This value acts as a weight for the width/height of a widget along the main axis.

Link copied to clipboard
data class Grow(val value: Double)

Configure how much of the remaining space in the layout should be assigned to this item.

Link copied to clipboard
data class Height(val height: Dp)

Set a required height for an item.

Link copied to clipboard
data class HorizontalAlignment(val alignment: CrossAxisAlignment)

Set the alignment for an item along the horizontal axis.

Link copied to clipboard
data class Margin(val margin: Margin)

Add additional space around the item.

Link copied to clipboard
interface RedwoodLayout
Link copied to clipboard
data class Row(val width: Constraint = Constraint.Wrap, val height: Constraint = Constraint.Wrap, val margin: Margin = Margin.Zero, val overflow: Overflow = Overflow.Clip, val horizontalAlignment: MainAxisAlignment = MainAxisAlignment.Start, val verticalAlignment: CrossAxisAlignment = CrossAxisAlignment.Start, val onScroll: (offset: Px) -> Unit? = null, val children: RowScope.() -> Unit)

Lays out widgets horizontally in a row.

Link copied to clipboard
object RowScope
Link copied to clipboard
data class Shrink(val value: Double)

Configure how much of the remaining space in the layout should be assigned to this item.

Link copied to clipboard
data class Size(val width: Dp, val height: Dp)

Set a required width and height for an item.

Link copied to clipboard
data class Spacer(val width: Dp = Dp(0.0), val height: Dp = Dp(0.0))

Adds empty space between other widgets.

Link copied to clipboard
data class VerticalAlignment(val alignment: CrossAxisAlignment)

Set the alignment for an item along the vertical axis.

Link copied to clipboard
data class Width(val width: Dp)

Set a required width for an item.