pub struct HandleRangeSliderThumbShape;Expand description
The bar shape of RangeSlider’s thumbs.
When the range slider is enabled, the ColorScheme::primary color is used for the
thumb. When the slider is disabled, the ColorScheme::on_surface color with an
opacity of 0.38 is used for the thumb.
The thumb bar shape width is reduced when the thumb is pressed.
If SliderThemeData::thumb_size is null, then the thumb size is 4 pixels for the width
and 44 pixels for the height.
If ThemeData::use_material3 is true and RangeSlider::year2023 is false, then the
RangeSlider will use HandleRangeSliderThumbShape as the default track shape.
See also:
RangeSlider, which includes thumbs defined by this shape.SliderTheme, which can be used to configure the thumbs shape of all range sliders in a widget subtree.
Implementations§
Source§impl HandleRangeSliderThumbShape
impl HandleRangeSliderThumbShape
Sourcepub const fn new() -> HandleRangeSliderThumbShape
pub const fn new() -> HandleRangeSliderThumbShape
Create a range slider thumb that draws a bar.
Trait Implementations§
Source§impl Clone for HandleRangeSliderThumbShape
impl Clone for HandleRangeSliderThumbShape
impl Copy for HandleRangeSliderThumbShape
Source§impl Debug for HandleRangeSliderThumbShape
impl Debug for HandleRangeSliderThumbShape
Source§impl RangeSliderThumbShape for HandleRangeSliderThumbShape
impl RangeSliderThumbShape for HandleRangeSliderThumbShape
Source§fn eq_shape(&self, other: &dyn RangeSliderThumbShape) -> bool
fn eq_shape(&self, other: &dyn RangeSliderThumbShape) -> bool
Value equality, as Dart’s canonicalized const instances are identical.
Source§fn get_preferred_size(&self, _is_enabled: bool, _is_discrete: bool) -> Size
fn get_preferred_size(&self, _is_enabled: bool, _is_discrete: bool) -> Size
Returns the preferred size of the shape, based on the given conditions. Read more
Source§fn paint(
&self,
app: &mut App,
context: &mut PaintingContext,
center: Offset,
_activation_animation: AnyAnimation<f64>,
enable_animation: AnyAnimation<f64>,
_is_discrete: Option<bool>,
_is_enabled: Option<bool>,
_is_on_top: Option<bool>,
_text_direction: Option<TextDirection>,
slider_theme: &SliderThemeData,
_thumb: Option<Thumb>,
_is_pressed: Option<bool>,
)
fn paint( &self, app: &mut App, context: &mut PaintingContext, center: Offset, _activation_animation: AnyAnimation<f64>, enable_animation: AnyAnimation<f64>, _is_discrete: Option<bool>, _is_enabled: Option<bool>, _is_on_top: Option<bool>, _text_direction: Option<TextDirection>, slider_theme: &SliderThemeData, _thumb: Option<Thumb>, _is_pressed: Option<bool>, )
Paints the thumb shape based on the state passed to it. Read more
impl StructuralPartialEq for HandleRangeSliderThumbShape
Auto Trait Implementations§
impl Forget for HandleRangeSliderThumbShape
impl Freeze for HandleRangeSliderThumbShape
impl Move for HandleRangeSliderThumbShape
impl RefUnwindSafe for HandleRangeSliderThumbShape
impl Send for HandleRangeSliderThumbShape
impl Sync for HandleRangeSliderThumbShape
impl Unpin for HandleRangeSliderThumbShape
impl UnsafeUnpin for HandleRangeSliderThumbShape
impl UnwindSafe for HandleRangeSliderThumbShape
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