You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Slider.label documentation should be clearer about behavior with continuous sliders #74098
A label to show above the slider when the slider is active.
It is used to display the value of a discrete slider, and it is displayed as part of the value indicator shape.
While it says that the label is used with discrete sliders, it doesn't actually say anything about continuous sliders. The implication from omission is that labels won't be shown for continuous sliders (which I verified is the case), but it would be much clearer to explicitly say so, in the same way that the documentation later says:
Ignored if this slider is created with Slider.adaptive.
Also, why is the label limited only to discrete sliders anyway?
Okay, looking at the code, I see that by default, the label is shown only for discrete sliders, but labels can be enabled for continuous sliders by setting SliderThemeData.showValueIndicator in a parent SliderTheme widget.
Showing labels only for discrete sliders still seems like a weird default, and the documentation still should be updated to mention SliderThemeData.showValueIndicator.
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.
Activity
jamesderlin commentedon Jan 16, 2021
Okay, looking at the code, I see that by default, the label is shown only for discrete sliders, but labels can be enabled for continuous sliders by setting
SliderThemeData.showValueIndicatorin a parentSliderThemewidget.Showing labels only for discrete sliders still seems like a weird default, and the documentation still should be updated to mention
SliderThemeData.showValueIndicator.HansMuller commentedon Jan 19, 2021
CC @clocksmith @JoseAlba
[material_ui] Clarify Slider labels for continuous sliders (#13121)
github-actions commentedon Oct 27, 2026
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.