Stacked

class Stacked(val layout: Stacked.Layout, val mainAxisAlignment: Stacked.MainAxisAlignment, val crossAxisAlignment: Stacked.CrossAxisAlignment, val gap: Size?, val children: List<Node>) : NestableNode

A block that contains nodes grouped together according to the given layout.

Parameters

layout

the way nodes are placed together

mainAxisAlignment

content alignment along the main axis

crossAxisAlignment

content alignment along the cross axis

gap

space between nodes

Constructors

Link copied to clipboard
constructor(layout: Stacked.Layout, mainAxisAlignment: Stacked.MainAxisAlignment, crossAxisAlignment: Stacked.CrossAxisAlignment, gap: Size?, children: List<Node>)

Types

Link copied to clipboard
data object Column : Stacked.Layout

A layout that stacks nodes vertically.

Link copied to clipboard

Possible alignment types along the cross axis of a Stacked block.

Link copied to clipboard
data class Grid(val columnCount: Int) : Stacked.Layout

A layout that stacks nodes in a grid.

Link copied to clipboard
sealed interface Layout : RenderRepresentable

Defines a way nodes of a Stacked block are placed together.

Link copied to clipboard

Possible alignment types along the main axis of a Stacked block.

Link copied to clipboard
data object Row : Stacked.Layout

A layout that stacks nodes horizontally.

Properties

Link copied to clipboard
open override val children: List<Node>
Link copied to clipboard
val gap: Size?
Link copied to clipboard

Functions

Link copied to clipboard
open override fun <T> accept(visitor: NodeVisitor<T>): T

Accepts a visitor.

Link copied to clipboard

Returns a sequence of all nodes in the tree, where this is the root node. The sequence is generated by traversing the tree in depth-first order. The root node is excluded from the sequence.

Link copied to clipboard