HandleRangeSliderThumbShape class

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.onSurface 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.thumbSize is null, then the thumb size is 4 pixels for the width and 44 pixels for the height.

If ThemeData.useMaterial3 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.
Inheritance

Constructors

HandleRangeSliderThumbShape.new()
Create a range slider thumb that draws a bar.
const

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

getPreferredSize(bool isEnabled, bool isDiscrete) Size
Returns the preferred size of the shape, based on the given conditions.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
paint(PaintingContext context, Offset center, {required Animation<double> activationAnimation, required Animation<double> enableAnimation, bool isDiscrete = false, bool isEnabled = false, bool? isOnTop, required SliderThemeData sliderTheme, TextDirection? textDirection, Thumb? thumb, bool? isPressed}) → void
Paints the thumb shape based on the state passed to it.
override
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited