pub struct HandleThumbShape;Expand description
The bar shape of a Slider’s thumb.
When the 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.
This is the default thumb shape for Slider. If ThemeData::use_material3 is false,
then the default thumb shape is RoundSliderThumbShape.
See also:
Slider, which includes an overlay defined by this shape.SliderTheme, which can be used to configure the overlay shape of all sliders in a widget subtree.
Implementations§
Source§impl HandleThumbShape
impl HandleThumbShape
Sourcepub const fn new() -> HandleThumbShape
pub const fn new() -> HandleThumbShape
Create a slider thumb that draws a bar.
Trait Implementations§
Source§impl Clone for HandleThumbShape
impl Clone for HandleThumbShape
impl Copy for HandleThumbShape
Source§impl Debug for HandleThumbShape
impl Debug for HandleThumbShape
Source§impl Default for HandleThumbShape
impl Default for HandleThumbShape
Source§impl PartialEq for HandleThumbShape
impl PartialEq for HandleThumbShape
Source§impl SliderComponentShape for HandleThumbShape
impl SliderComponentShape for HandleThumbShape
Source§fn eq_shape(&self, other: &dyn SliderComponentShape) -> bool
fn eq_shape(&self, other: &dyn SliderComponentShape) -> 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.
Source§fn paint(
&self,
app: &mut App,
context: &mut PaintingContext,
center: Offset,
_activation_animation: AnyAnimation<f64>,
enable_animation: AnyAnimation<f64>,
_is_discrete: bool,
_label_painter: &mut TextPainter,
_parent_box: AnyRenderBox,
slider_theme: &SliderThemeData,
_text_direction: TextDirection,
_value: f64,
_text_scale_factor: f64,
_size_with_overflow: Size,
)
fn paint( &self, app: &mut App, context: &mut PaintingContext, center: Offset, _activation_animation: AnyAnimation<f64>, enable_animation: AnyAnimation<f64>, _is_discrete: bool, _label_painter: &mut TextPainter, _parent_box: AnyRenderBox, slider_theme: &SliderThemeData, _text_direction: TextDirection, _value: f64, _text_scale_factor: f64, _size_with_overflow: Size, )
Paints the shape, taking into account the state passed to it. Read more
impl StructuralPartialEq for HandleThumbShape
Auto Trait Implementations§
impl Forget for HandleThumbShape
impl Freeze for HandleThumbShape
impl Move for HandleThumbShape
impl RefUnwindSafe for HandleThumbShape
impl Send for HandleThumbShape
impl Sync for HandleThumbShape
impl Unpin for HandleThumbShape
impl UnsafeUnpin for HandleThumbShape
impl UnwindSafe for HandleThumbShape
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