ArrangementSchema
Arrangement value controlling how children are distributed along the main axis of a container.
Three sub-interfaces correspond to layout direction:
Horizontal — for
RowTilemain axis. Includes Horizontal.Start, Horizontal.End, Horizontal.SpacedBy, plus any HorizontalOrVertical variant.Vertical — for
ColumnTilemain axis. Includes Vertical.Top, Vertical.Bottom, Vertical.SpacedBy, plus any HorizontalOrVertical variant.HorizontalOrVertical — valid for both Row and Column: HorizontalOrVertical.Center, HorizontalOrVertical.SpaceEvenly, HorizontalOrVertical.SpaceBetween, HorizontalOrVertical.SpaceAround.
SpacedBy takes a space (dp) and an optional cross-axis alignment to align children along the cross axis within each slot.
DSL helpers (mosaic-server):
// For Column:
arrangeVerticallyToTop()
arrangeVerticallyToBottom()
arrangeVerticallySpacedBy(space = 16, alignment = alignVerticallyToCenter())
arrangeToCenter() // HorizontalOrVertical.Center
arrangeToSpaceEvenly()
arrangeToSpaceBetween()
arrangeToSpaceAround()
// For Row:
arrangeHorizontallyToStart()
arrangeHorizontallyToEnd()
arrangeHorizontallySpacedBy(space = 8)
arrangeToCenter() // also valid for RowNotes: Horizontal.Start and Vertical.Top are the fallback when the when branch hits an else in the client extensions — unknown arrangements default to Start/Top.