pub enum LinearArrangement {
Start,
End,
Center,
SpaceBetween,
SpaceAround,
SpaceEvenly,
SpacedBy(f32),
SpacedByAligned {
spacing: f32,
bias: f32,
},
}Expand description
Arrangement strategy matching Jetpack Compose’s linear arrangements.
Variants§
Start
Place children consecutively starting from the leading edge.
End
Place children so the last child touches the trailing edge.
Center
Place children so they are centered as a block.
SpaceBetween
Distribute the remaining space evenly between children.
SpaceAround
Distribute the remaining space before, after, and between children.
SpaceEvenly
Distribute the remaining space before the first child, between children, and after the last child.
SpacedBy(f32)
Insert a fixed amount of space between children.
SpacedByAligned
Insert a fixed amount of space between children and place the block
they make at bias of the space left over: -1 the start, 0 the
middle, 1 the end.
Implementations§
Source§impl LinearArrangement
impl LinearArrangement
Sourcepub fn spaced_by(spacing: f32) -> Self
pub fn spaced_by(spacing: f32) -> Self
Creates an arrangement that inserts a fixed spacing between children.
Sourcepub fn spaced_by_aligned(spacing: f32, alignment: impl AxisAlignment) -> Self
pub fn spaced_by_aligned(spacing: f32, alignment: impl AxisAlignment) -> Self
Compose’s Arrangement.spacedBy(space, alignment): spacing between
children, and the block they make placed by alignment in the space
left over, as when the numbers of a table cell keep to its end.