Issue
Is there a ready-made library that does this widget in the picture?
Solution
Yes, you can use syncfusion_flutter_sliders or RangeSlider from Flutter's material library
Example of syncfusion_flutter_sliders
:
SfRangeValues _values = SfRangeValues(3.0, 7.0);
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
body: Center(
child: SfRangeSlider.horizontal(
min: 0.0,
max: 10.0,
values: _values,
onChanged: (SfRangeValues newValues) {
setState(() {
_values = newValues;
});
},
)
)
)
);
}
Example of rangeSlider
:
RangeValues values = RangeValues(1, 100);
RangeSlider(
activeColor: Colors.red[700],
inactiveColor: Colors.red[300],
min: 1,
max: 100,
values: values,
onChanged: (values){
setState(() {
values =values;
});
}
),
Answered By - Rohith Nambiar
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.