inital value of _value is 200, but when i change the value with the slider, it does not pass it to the controller (i mean because of init it takes as default 200 and never changes)
int _value = 200;
@override
void initState() {
super.initState();
_yellowController = AnimationController(
duration: Duration(milliseconds: _value), vsync: this)
..addListener(() {
setState(() {});
});
}
Slider(
min: 200,
max: 2000,
activeColor: Colors.black54,
inactiveColor: Colors.black12,
thumbColor: Colors.black,
value: _value.toDouble(),
onChanged: (value) {
_value = value.round();
setState(() {});
},
),