pub struct SwitchScope { /* private fields */ }Expand description
A Switch and its builder.
Implementations§
Source§impl SwitchScope
impl SwitchScope
Sourcepub fn track_color(self, paint: Paint) -> Self
pub fn track_color(self, paint: Paint) -> Self
The track, whichever state it is in. The Host owns the state, so it passes the colour that goes with it.
Source§impl SwitchScope
impl SwitchScope
Sourcepub fn thumb_color(self, paint: Paint) -> Self
pub fn thumb_color(self, paint: Paint) -> Self
The thumb that travels along the track.
Source§impl SwitchScope
impl SwitchScope
Source§impl SwitchScope
impl SwitchScope
Sourcepub fn accessible_name(self, name: impl Into<String>) -> Self
pub fn accessible_name(self, name: impl Into<String>) -> Self
The name assistive technology reads. With no visible label it is the control’s name; with one it replaces the label, and on an icon-only button it is read instead of the icon’s meaning.
Source§impl SwitchScope
impl SwitchScope
Source§impl SwitchScope
impl SwitchScope
Source§impl SwitchScope
impl SwitchScope
Sourcepub fn on_motion_finished(
self,
handler: impl FnMut(MotionFinished) + 'static,
) -> Self
pub fn on_motion_finished( self, handler: impl FnMut(MotionFinished) + 'static, ) -> Self
Runs once when this node’s size motion comes to rest, with the size it settled
at in dp. The node needs Modifier::motion for its size to move; without it
nothing is reported. A run interrupted by a newer size is not reported, only
the one that settles, and under reduced motion it arrives in the frame the
size changes in.
Trait Implementations§
Source§impl Drop for SwitchScope
impl Drop for SwitchScope
Auto Trait Implementations§
impl !RefUnwindSafe for SwitchScope
impl !Send for SwitchScope
impl !Sync for SwitchScope
impl !UnwindSafe for SwitchScope
impl Forget for SwitchScope
impl Freeze for SwitchScope
impl Move for SwitchScope
impl Unpin for SwitchScope
impl UnsafeUnpin for SwitchScope
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