RectangularRangeSliderTrackShape class Null safety
A RangeSlider track that's a simple rectangle.
It paints a solid colored rectangle, vertically centered in the
parentBox
. The track rectangle extends to the bounds of the parentBox
,
but is padded by the RoundSliderOverlayShape radius. The height is
defined by the SliderThemeData.trackHeight. The color is determined by the
Slider's enabled state and the track segment's active state which are
defined by:
SliderThemeData.activeTrackColor,
SliderThemeData.inactiveTrackColor,
SliderThemeData.disabledActiveTrackColor,
SliderThemeData.disabledInactiveTrackColor.
The track segment between the two thumbs is the active track segment. The track segments between the thumb and each end of the slider are the inactive track segments. In TextDirection.ltr, the start of the slider is on the left, and in TextDirection.rtl, the start of the slider is on the right.
![A range slider widget, consisting of 5 divisions and showing the rectangular range slider track shape.] (https://flutter.github.io/assets-for-api-docs/assets/material/rectangular_range_slider_track_shape.png)
See also:
- RangeSlider, for the component that is meant to display this shape.
- SliderThemeData, where an instance of this class is set to inform the slider of the visual details of the its track.
- RangeSliderTrackShape, which can be used to create custom shapes for the RangeSlider's track.
- RoundedRectRangeSliderTrackShape, for a similar track with rounded edges.
- Inheritance
-
- Object
- RangeSliderTrackShape
- RectangularRangeSliderTrackShape
Constructors
- RectangularRangeSliderTrackShape()
-
Create a slider track with rectangular outer edges.
const
Properties
- hashCode → int
-
The hash code for this object.
read-onlyinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
read-onlyinherited
Methods
-
getPreferredRect(
{required RenderBox parentBox, Offset offset = Offset.zero, required SliderThemeData sliderTheme, bool isEnabled = false, bool isDiscrete = false}) → Rect -
Returns the preferred bounds of the shape.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed.
inherited
-
paint(
PaintingContext context, Offset offset, {required RenderBox parentBox, required SliderThemeData sliderTheme, required Animation< double> ? enableAnimation, required Offset startThumbCenter, required Offset endThumbCenter, bool isEnabled = false, bool isDiscrete = false, required TextDirection textDirection}) → void -
Paints the track 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