pub struct SwitchTheme {
pub track_color: Option<Color>,
pub inactive_track_color: Option<Color>,
pub thumb_color: Option<Color>,
pub inactive_thumb_color: Option<Color>,
pub icon_color: Option<Color>,
pub inactive_icon_color: Option<Color>,
pub tap_target: Option<TapTarget>,
}Expand description
Defaults for Switch.
Fields§
§track_color: Option<Color>The track, on.
inactive_track_color: Option<Color>The track, off.
thumb_color: Option<Color>The thumb, on.
inactive_thumb_color: Option<Color>The thumb, off. Unset it follows the on colour, which is what the reference does and what a switch looks like: one thumb sliding, not two.
icon_color: Option<Color>The glyph inside the thumb, on. Unset, the scheme’s on_primary_container
(switch.dart:2338).
inactive_icon_color: Option<Color>The glyph inside the thumb, off. Unset, the scheme’s surface_container_highest
(switch.dart:2349) — the track’s own colour, so the glyph reads as a hole in the
thumb rather than as a mark on it.
tap_target: Option<TapTarget>How much room it reserves for a finger — the reference’s per-widget say over
the theme’s (switch.dart:603). Unset, the theme’s own answer.
Trait Implementations§
Source§impl Clone for SwitchTheme
impl Clone for SwitchTheme
impl Copy for SwitchTheme
Source§impl Debug for SwitchTheme
impl Debug for SwitchTheme
Source§impl Default for SwitchTheme
impl Default for SwitchTheme
Source§impl PartialEq for SwitchTheme
impl PartialEq for SwitchTheme
impl StructuralPartialEq for SwitchTheme
Auto Trait Implementations§
impl Freeze for SwitchTheme
impl RefUnwindSafe for SwitchTheme
impl Send for SwitchTheme
impl Sync for SwitchTheme
impl Unpin for SwitchTheme
impl UnsafeUnpin for SwitchTheme
impl UnwindSafe for SwitchTheme
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