The Code below only changes the slider from 1-10, how do you change the text while changing the slider as well in Flutter?
The Text is fetched from an API.
double _value = 0.0;
[enter image description here][1] bool _slider = false;
child: _slider == true
? new Container(
margin: EdgeInsets.only(right: 10),
decoration: new BoxDecoration(
color: NNDColors.main,
borderRadius: new BorderRadius.all(
new Radius.circular(5.0)),
boxShadow: [
new BoxShadow(
color: Colors.black38,
offset: new Offset(0.0, 2.0),
blurRadius: 10)
]),
child: new Slider(
value: _value,
activeColor: Colors.white,
inactiveColor: Colors.white,
onChanged: (double s) => _changed(s),
divisions: 10,
min: 0.0,
max: 10.0,
),
void _changed(s) {
setState((){
_value = s;
});
}