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) -> LinearArrangement
pub fn spaced_by(spacing: f32) -> LinearArrangement
Creates an arrangement that inserts a fixed spacing between children.
Sourcepub fn spaced_by_aligned(
spacing: f32,
alignment: impl AxisAlignment,
) -> LinearArrangement
pub fn spaced_by_aligned( spacing: f32, alignment: impl AxisAlignment, ) -> LinearArrangement
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.
Trait Implementations§
Source§impl Arrangement for LinearArrangement
impl Arrangement for LinearArrangement
Source§impl Clone for LinearArrangement
impl Clone for LinearArrangement
Source§fn clone(&self) -> LinearArrangement
fn clone(&self) -> LinearArrangement
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more