pub struct SliderScope { /* private fields */ }Expand description
A Slider and its builder.
Implementations§
Source§impl SliderScope
impl SliderScope
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 SliderScope
impl SliderScope
Sourcepub fn track_color(self, paint: Paint) -> Self
pub fn track_color(self, paint: Paint) -> Self
The part of the track that is not filled.
Source§impl SliderScope
impl SliderScope
Sourcepub fn thumb_color(self, paint: Paint) -> Self
pub fn thumb_color(self, paint: Paint) -> Self
The thumb.
Source§impl SliderScope
impl SliderScope
Sourcepub fn active_track_color(self, paint: Paint) -> Self
pub fn active_track_color(self, paint: Paint) -> Self
The part of the track up to the thumb.
Source§impl SliderScope
impl SliderScope
pub fn enabled(self, enabled: bool) -> Self
Sourcepub fn thumb_size(self, dp: f32) -> Self
pub fn thumb_size(self, dp: f32) -> Self
The thumb’s diameter in dp. Without it the design system picks the size. The track and the area that takes a press do not change with it, so a small thumb is still easy to grab.
pub fn on_change(self, handler: impl FnMut(f32) + 'static) -> Self
Source§impl SliderScope
impl SliderScope
Source§impl SliderScope
impl SliderScope
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.