我正在使用 Slider,我想更改拇指颜色,但这不起作用。thumbColor 接受来自 Child:Slider activeColor 的颜色。
SliderTheme(
data:SliderTheme.of(context).copyWith(
// thumbShape: RoundSliderThumbShape(enabledThumbRadius: 19.0),
// overlayColor: Colors.grey,
thumbColor: Colors.white,
),
child: Slider(
inactiveColor: Colors.transparent,
min: 0,
activeColor: Color(0xffF3C961),
value: value.toDouble(),
max: MediaQuery.of(context).size.height,
onChanged: (changedValue){
setState(() {
value = changedValue.toInt();
});
},
),
),[![You can check color of thumb shape][1]][1]