pub fn switch<State: 'static, F: Fn(&mut State, bool) + 'static>(
checked: bool,
on_toggle: F,
) -> SwitchView<State>Expand description
Create a switch reflecting checked that fires on_toggle(state, !checked) on release inside its bounds.