SliderTrackShape class

context is the same context for the render box of the Slider. center is the offset of the center where this shape should be painted. This offset is relative to the origin of the context canvas. sliderTheme is the theme assigned to the Slider that this shape belongs to. isEnabled has the same value as Slider.isInteractive. If true, the slider will respond to input. 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. parentBox is the RenderBox of the Slider. Its attributes, such as size, can be used to assist in painting this shape.Base class for slider track shapes.

The slider's thumb moves along the track. A discrete slider's tick marks are drawn after the track, but before the thumb, and are aligned with the track.

The getPreferredRect helps position the slider thumb and tick marks relative to the track.

See also:

Implementers

Constructors

SliderTrackShape()
Abstract const constructor. This 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

getPreferredRect({RenderBox parentBox, Offset offset: Offset.zero, SliderThemeData sliderTheme, bool isEnabled, bool isDiscrete }) Rect
Returns the preferred bounds of the shape. [...]
paint(PaintingContext context, Offset offset, { RenderBox parentBox, SliderThemeData sliderTheme, Animation<double> enableAnimation, Offset thumbCenter, bool isEnabled, bool isDiscrete, TextDirection textDirection }) → void
Paints the track shape based on 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