SliderComponentShape class

center is the offset for where this shape's center should be painted. This offset is relative to the origin of the context canvas. context is the same as the one that includes the Slider's render box. enableAnimation is an animation triggered when the Slider is enabled, and it reverses when the slider is disabled. Enabled is the Slider.isInteractive state. Use this to paint intermediate frames for this shape when the slider changes enabled state. isDiscrete is true if Slider.divisions is non-null. If true, the slider will render tick marks on top of the track. isEnabled has the same value as Slider.isInteractive. If true, the slider will respond to input. parentBox is the RenderBox of the Slider. Its attributes, such as size, can be used to assist in painting this shape.sliderTheme is the theme assigned to the Slider that this shape belongs to. activationAnimation is an animation triggered when the user begins to interact with the RangeSlider. It reverses when the user stops interacting with the slider. context is the same as the one that includes the RangeSlider's render box. enableAnimation is an animation triggered when the RangeSlider is enabled, and it reverses when the slider is disabled. Enabled is the RangeSlider.isEnabled state. Use this to paint intermediate frames for this shape when the slider changes enabled state. isDiscrete is true if RangeSlider.divisions is non-null. If true, the slider will render tick marks on top of the track. isEnabled has the same value as RangeSlider.isEnabled. If true, the slider will respond to input. parentBox is the RenderBox of the RangeSlider. Its attributes, such as size, can be used to assist in painting this shape. sliderTheme is the theme assigned to the RangeSlider that this shape belongs to. thumb Is the specifier for which of the two thumbs this method should paint, start or end.Base class for slider thumb, thumb overlay, and value indicator shapes.

Create a subclass of this if you would like a custom shape.

All shapes are painted to the same canvas and ordering is important. The overlay is painted first, then the value indicator, then the thumb.

The thumb painting can be skipped by specifying noThumb for SliderThemeData.thumbShape.

The overlay painting can be skipped by specifying noOverlay for SliderThemeData.overlayShape.

See also:

Implementers

Constructors

SliderComponentShape()
This abstract const constructor enables subclasses to provide const constructors so that they can be used in const expressions.
const

Properties

hashCode int
The hash code for this object. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

getPreferredSize(bool isEnabled, bool isDiscrete) Size
Returns the preferred size of the shape, based on the given conditions.
paint(PaintingContext context, Offset center, { Animation<double> activationAnimation, Animation<double> enableAnimation, bool isDiscrete, TextPainter labelPainter, RenderBox parentBox, SliderThemeData sliderTheme, TextDirection textDirection, double value }) → void
Paints the shape, taking into account the state passed to it. [...]
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
Returns a string representation of this object.
inherited

Operators

operator ==(dynamic other) bool
The equality operator. [...]
inherited

Static Properties

noOverlay SliderComponentShape
Special instance of SliderComponentShape to skip the overlay drawing. [...]
final
noThumb SliderComponentShape
Special instance of SliderComponentShape to skip the thumb drawing. [...]
final