ltk

Function list_item

Source
pub fn list_item<Msg: Clone>(label: impl Into<String>) -> ListItem<Msg>
Expand description

Create a ListItem with the given primary label.

Add detail and behaviour through the chained builders. For a disclosure arrow use ListItem::trailing_icon with a theme icon (e.g. "general/right") rather than a text glyph:

list_item( "Display" )
    .subtitle( "Resolution, brightness, night mode" )
    .trailing( "Light" )
    .on_press( Msg::OpenDisplay )