build method
Implementation
@override
Widget build(BuildContext context) {
return Slider(
value: value.toDouble(),
onChanged: (v) {
this.value = v.round();
onChanged?.call(this.value);
updateState();
},
secondaryTrackValue: secondaryTrackValue?.toDouble(),
onChangeStart: onChangeStart == null ? null : (v) => onChangeStart?.call(v.toInt()),
onChangeEnd: onChangeEnd == null ? null : (v) => onChangeEnd?.call(v.toInt()),
min: min.toDouble(),
max: max.toDouble(),
divisions: divisions,
label: labelBuilder?.call(value) ?? label ?? (autoLabel ? value.toString() : null),
activeColor: activeColor,
inactiveColor: inactiveColor,
secondaryActiveColor: secondaryActiveColor,
thumbColor: thumbColor,
overlayColor: overlayColor,
mouseCursor: mouseCursor,
semanticFormatterCallback: semanticFormatterCallback == null ? null : (v) => semanticFormatterCallback!.call(v.toInt()),
focusNode: focusNode,
autofocus: autofocus,
allowedInteraction: allowedInteraction,
);
}