pub struct SwitchConfig {Show 21 fields
pub modifier: Modifier,
pub enabled: bool,
pub checked_track_color: Color,
pub unchecked_track_color: Color,
pub checked_thumb_color: Color,
pub unchecked_thumb_color: Color,
pub checked_icon_color: Color,
pub unchecked_icon_color: Color,
pub checked_border_color: Color,
pub unchecked_border_color: Color,
pub disabled_checked_thumb_color: Color,
pub disabled_checked_track_color: Color,
pub disabled_checked_border_color: Color,
pub disabled_checked_icon_color: Color,
pub disabled_unchecked_thumb_color: Color,
pub disabled_unchecked_track_color: Color,
pub disabled_unchecked_border_color: Color,
pub disabled_unchecked_icon_color: Color,
pub state_colors: StateColors,
pub thumb_content: Option<View>,
pub interaction_source: Option<MutableInteractionSource>,
}Expand description
Configuration for Switch.
Fields§
§modifier: Modifier§enabled: boolWhen false, renders disabled colors and does not respond to clicks.
checked_track_color: Color§unchecked_track_color: Color§checked_thumb_color: Color§unchecked_thumb_color: Color§checked_icon_color: ColorIcon color for the thumb content when checked. Default: on_primary.
unchecked_icon_color: ColorIcon color for the thumb content when unchecked. Default: outline.
checked_border_color: ColorBorder color when checked. Default: transparent.
unchecked_border_color: ColorBorder color when unchecked.
disabled_checked_thumb_color: Color§disabled_checked_track_color: Color§disabled_checked_border_color: Color§disabled_checked_icon_color: Color§disabled_unchecked_thumb_color: Color§disabled_unchecked_track_color: Color§disabled_unchecked_border_color: Color§disabled_unchecked_icon_color: Color§state_colors: StateColors§thumb_content: Option<View>§interaction_source: Option<MutableInteractionSource>Trait Implementations§
Source§impl Clone for SwitchConfig
impl Clone for SwitchConfig
Source§fn clone(&self) -> SwitchConfig
fn clone(&self) -> SwitchConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SwitchConfig
impl Debug for SwitchConfig
Auto Trait Implementations§
impl !RefUnwindSafe for SwitchConfig
impl !Send for SwitchConfig
impl !Sync for SwitchConfig
impl !UnwindSafe for SwitchConfig
impl Freeze for SwitchConfig
impl Unpin for SwitchConfig
impl UnsafeUnpin for SwitchConfig
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