RoundedRectSliderValueIndicatorShape class

The rounded rectangle shape of a Slider's value indicator.

If the SliderThemeData.valueIndicatorColor is null, then the shape uses the ColorScheme.inverseSurface color to draw the value indicator.

If the SliderThemeData.valueIndicatorTextStyle is null, then the indicator label text style defaults to TextTheme.labelMedium with the color set to ColorScheme.onInverseSurface. If the ThemeData.useMaterial3 is set to false, then the indicator label text style defaults to TextTheme.bodyLarge with the color set to ColorScheme.onInverseSurface.

If the SliderThemeData.valueIndicatorStrokeColor is provided, then the value indicator is drawn with a stroke border with the color provided.

This is the default value indicator shape for Slider. If ThemeData.useMaterial3 is false, then the default value indicator shape is RectangularSliderValueIndicatorShape.

See also:

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

Constructors

RoundedRectSliderValueIndicatorShape()
Create a slider value indicator that resembles a rounded rectangle.
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

getPreferredSize(bool isEnabled, bool isDiscrete, {TextPainter? labelPainter, double? textScaleFactor}) Size
Returns the preferred size of the shape, based on the given conditions.
override
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