pub struct ListTile {Show 15 fields
pub title: String,
pub subtitle: Option<String>,
pub leading: Option<BoxedWidget>,
pub trailing: Option<BoxedWidget>,
pub selected: bool,
pub height: f32,
pub padding_h: f32,
pub title_size: f32,
pub subtitle_size: f32,
pub title_color: Color,
pub subtitle_color: Color,
pub bg: Color,
pub selected_bg: Color,
pub selected_accent: Color,
pub divider: bool,
/* private fields */
}Expand description
A standard list row: leading widget + title + subtitle + trailing widget.
Fields§
§title: String§subtitle: Option<String>§leading: Option<BoxedWidget>§trailing: Option<BoxedWidget>§selected: bool§height: f32§padding_h: f32§title_size: f32§subtitle_size: f32§title_color: ColorTRANSPARENT (alpha 0) = use the active theme’s on_surface.
subtitle_color: ColorTRANSPARENT (alpha 0) = use the active theme’s secondary.
bg: Color§selected_bg: ColorTRANSPARENT (alpha 0) = use the active theme’s primary_container.
selected_accent: ColorTRANSPARENT (alpha 0) = use the active theme’s primary.
divider: boolImplementations§
Source§impl ListTile
impl ListTile
pub fn new(title: impl Into<String>) -> Self
pub fn subtitle(self, s: impl Into<String>) -> Self
pub fn leading(self, w: impl Widget + 'static) -> Self
pub fn trailing(self, w: impl Widget + 'static) -> Self
pub fn selected(self) -> Self
pub fn height(self, h: f32) -> Self
pub fn no_divider(self) -> Self
pub fn title_color(self, c: Color) -> Self
pub fn background(self, c: Color) -> Self
Trait Implementations§
Source§impl Widget for ListTile
impl Widget for ListTile
Source§fn layout(&self, ctx: &LayoutCtx<'_>) -> Size
fn layout(&self, ctx: &LayoutCtx<'_>) -> Size
Measure under
ctx.constraints and return a size within them. Read moreSource§fn children(&self) -> Children<'_>
fn children(&self) -> Children<'_>
Declare this widget’s children. Drives every default below.
Source§fn flex_factor(&self) -> f32
fn flex_factor(&self) -> f32
Flex weight inside Row/Column. Wrappers are transparent by default.
Auto Trait Implementations§
impl !RefUnwindSafe for ListTile
impl !UnwindSafe for ListTile
impl Freeze for ListTile
impl Send for ListTile
impl Sync for ListTile
impl Unpin for ListTile
impl UnsafeUnpin for ListTile
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
Mutably borrows from an owned value. Read more
Source§impl<W> FocusApi for W
impl<W> FocusApi for W
Source§fn focus_node(self, node: FocusNode) -> WithFocus<Self>
fn focus_node(self, node: FocusNode) -> WithFocus<Self>
Attach a focus node. This enables focus-ring rendering and explicit
neighbor wiring.