label property
A label to show inside the value indicator above the slider's thumb.
By default, the label is shown while dragging a discrete slider, where divisions is non-null. It can also be shown for a continuous slider, where divisions is null, by setting showValueIndicator to ShowValueIndicator.onlyForContinuous, ShowValueIndicator.onDrag, or ShowValueIndicator.alwaysVisible.
If showValueIndicator is null, the ambient SliderThemeData.showValueIndicator determines when the label is shown.
The label is rendered using the active ThemeData's TextTheme.bodyLarge 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;