SliderTheme(
data: SliderThemeData(
trackHeight: widget.trackHeight,
activeTrackColor: widget.sliderBackground == null ? Colors.blue : Colors.transparent,
inactiveTrackColor: widget.sliderBackground == null ? Color(0xfff5f6f7) : Colors.transparent,
activeTickMarkColor: Colors.transparent,
inactiveTickMarkColor: Colors.transparent,
valueIndicatorColor: Colors.green,
valueIndicatorTextStyle: TextStyle(
color:Colors.white,
),
overlayColor: widget.thumbBorderColor ?? Colors.grey[300],
overlayShape: RoundSliderOverlayShape(
overlayRadius: thumbRadius + widget.thumbBorderWidth,
),
thumbColor: widget.thumbColor ?? Colors.white,
thumbShape: RoundSliderThumbShape(
disabledThumbRadius: widget.trackHeight > 10 ? thumbRadius : 11,
enabledThumbRadius: widget.trackHeight > 10 ? thumbRadius : 11,
),
),
child: Slider(
min: transValue(widget.min, true),
max: transValue(widget.max, true),
value: transValue(_value, true),
onChanged: (double value) {
onSliderValue(value, false);
},
onChangeEnd: (double value) {
onSliderValue(value, true);
},
)
)