label property Null safety
final
A label to show above the slider when the slider is active and SliderThemeData.showValueIndicator is satisfied.
It is used to display the value of a discrete slider, and it is displayed as part of the value indicator shape.
The label is rendered using the active ThemeData's TextTheme.bodyText1 text style, with the theme data's ColorScheme.onPrimary color. The label's text style can be overridden with SliderThemeData.valueIndicatorTextStyle.
If null, then the value indicator will not be displayed.
Ignored if this slider is created with Slider.adaptive.
See also:
- SliderComponentShape for how to create a custom value indicator shape.
Implementation
final String? label;