SliderTrackShape class abstract
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:
- RoundedRectSliderTrackShape for the default Slider's track shape that paints a stadium-like track.
- SliderTickMarkShape, which can be used to create custom shapes for the Slider's tick marks.
- SliderComponentShape, which can be used to create custom shapes for the Slider's thumb, overlay, and value indicator and the RangeSlider's overlay.
- Implementers
Constructors
- SliderTrackShape()
-
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.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
getPreferredRect(
{required RenderBox parentBox, Offset offset = Offset.zero, required SliderThemeData sliderTheme, bool isEnabled, bool isDiscrete}) → Rect - Returns the preferred bounds of the shape.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
paint(
PaintingContext context, Offset offset, {required RenderBox parentBox, required SliderThemeData sliderTheme, required Animation< double> enableAnimation, required Offset thumbCenter, Offset? secondaryOffset, bool isEnabled, bool isDiscrete, required TextDirection textDirection}) → void - Paints the track shape based on the state passed to it.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited