LightnessSliderThumb class

The LightnessSliderThumb is a custom version of RoundSliderThumbShape that draws a circle as thumb, with color as color inside the thumb. It also display's slider value inside the thumb.

The slider thumb theme color is used for the circle outline and text color for the displayed value.

There is a shadow for the resting, pressed, hovered, and focused state.

See also:

  • Slider, which includes a thumb defined by this shape.
  • SliderTheme, which can be used to configure the thumb shape of all sliders in a widget subtree.
Inheritance

Constructors

LightnessSliderThumb({required Color color, double enabledThumbRadius = lightnessThumbRadius, double? disabledThumbRadius, double elevation = 1.0, double pressedElevation = 4.0, Orientation orientation = Orientation.portrait})
Create a slider thumb that draws a circle filled with color and shows the slider value * 100 in the thumb.
const

Properties

color Color
Color used to fill the inside of the thumb.
final
disabledThumbRadius double?
The preferred radius of the round thumb shape when the slider is disabled.
finalinherited
elevation double
The resting elevation adds shadow to the unpressed thumb.
finalinherited
enabledThumbRadius double
The preferred radius of the round thumb shape when the slider is enabled.
finalinherited
hashCode int
The hash code for this object.
no setterinherited
orientation Orientation
final
pressedElevation double
The pressed elevation adds shadow to the pressed thumb.
finalinherited
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.
inherited
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, required bool isDiscrete, required TextPainter labelPainter, required RenderBox parentBox, required SliderThemeData sliderTheme, required TextDirection textDirection, required double value, required double textScaleFactor, required Size sizeWithOverflow}) → void
Paints the shape, taking into account the state passed to it.
override
toString() String
A string representation of this object.
inherited

Operators

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