Introduce ButtonStyle
equivalent customisation for Slider
and RangeSlider
#126068
Labels
c: proposal
A detailed proposal for a change to Flutter
f: material design
flutter/packages/flutter/material repository.
framework
flutter/packages/flutter repository. See also f: labels.
team-design
Owned by Design Languages team
triaged-design
Triaged by Design Languages team
Is there an existing issue for this?
Use case
Customizing
Slider
andRangeSlider
should be as easy as customizing buttons. Currently customizingSlider
andRangeSlider
is complex and messy.Right now just to customize the border radius of the slider components such as track or value indicator you need to copy the source code for that component and modify its radius. We don't do this for any other widget.
Some slider components have radius customization but others don't. it'd be better to have consistent customization as we have for different material buttons.
flutter/packages/flutter/lib/src/material/slider_theme.dart
Lines 282 to 290 in ce32282
There are separate active, inactive, and disabled colors to be provided. These should be using material states.
flutter/packages/flutter/lib/src/material/slider_theme.dart
Lines 267 to 276 in ce32282
slider_theme.dart
:Proposal
ButtonStyle
equivalent customization class forSlider
andRangeSlider
ButtonStyle.from
when you want to just customize default components such as radius, size, elevation, etc.SliderThemeData
.Slider
andRangeSlider
while keeping the ability to provide your own custom shapes.I will implement this as part of #125329
The text was updated successfully, but these errors were encountered: