Skip to main content

segmented_choice

Function segmented_choice 

Source
pub fn segmented_choice<'a, T, Message>(
    options: &[T],
    selected: Option<&T>,
    label: impl Fn(&T) -> String,
    on_select: impl Fn(T) -> Message,
    scale: FontScale,
) -> Element<'a, Message>
where T: Clone + PartialEq, Message: Clone + 'a,
Expand description

A setting whose value is one of a few named options, shown all at once — the mockup’s Off | Always | Fullscreen.

For three or four short options. Past that the row runs out of room and a dropdown is the honest control.