@override
Widget build(BuildContext context) {
double currentSliderValue = 100.0;
return Scaffold(
appBar: AppBar(
backgroundColor: Theme.of(context).colorScheme.inversePrimary,
title: Text(widget.title),
),
body: Slider(
value: currentSliderValue,
onChanged: (double value) {
setState(() {
currentSliderValue = value;
});
},
label: '$currentSliderValue',
),
),
);
}
}
I tyied to make a slider , its very similir as other example, its value could be changed, but didnt move at all

the problem is that you initialize the value inside the build method, which is called every time the widget is rendered, as with setState.
Just change to this