Flutter RangeLabels on RangeSlider not working
Here's how you can achieve the same
SliderTheme(
data: SliderThemeData(
showValueIndicator: ShowValueIndicator.always
),
child: RangeSlider(
values: _values,
min: 0,
max: 1000,
labels: RangeLabels('${_values.start.round()}', '${_values.end.round()}'),
inactiveColor: Colors.grey,
activeColor: Colors.black,
onChanged: (RangeValues values) {
setState(() {
_values = values;
});
},
),
);
Here _values are the RangeValues defined in State class like this
class _FilterScreenState extends State<FilterScreen>{
RangeValues _values = RangeValues(100, 900);
}