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 moreimpl Copy for LinearArrangement
Source§impl Debug for LinearArrangement
impl Debug for LinearArrangement
Source§impl PartialEq for LinearArrangement
impl PartialEq for LinearArrangement
impl StructuralPartialEq for LinearArrangement
Auto Trait Implementations§
impl Freeze for LinearArrangement
impl RefUnwindSafe for LinearArrangement
impl Send for LinearArrangement
impl Sync for LinearArrangement
impl Unpin for LinearArrangement
impl UnsafeUnpin for LinearArrangement
impl UnwindSafe for LinearArrangement
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more