DHSlider.image constructor
DHSlider.image({
- Key? key,
- double? trackHeight,
- required Image? trackImage,
- double enabledThumbRadius = 12.0,
- double? disabledThumbRadius,
- required Image? thumbImage,
- required double value,
- double min = 0.0,
- double max = 1.0,
- int? divisions,
- String? label,
- FocusNode? focusNode,
- bool autoFocus = false,
- SliderComponentShape? indicatorShape,
- Indicator? indicator,
- IndicatorStyle? indicatorStyle,
- ShowValueIndicator? showValueIndicator,
- TextStyle? indicatorTextStyle,
- ValueChanged<
double> ? onChangeStart, - ValueChanged<
double> ? onChangeEnd, - ValueChanged<
double> ? onChanged, - bool disabled = false,
- double? width,
- double? height,
- Color? backgroundColor,
- EdgeInsetsGeometry? padding,
- EdgeInsetsGeometry? margin,
- bool inScroll = false,
使用track 和 thumb 图片
Implementation
DHSlider.image({
Key? key,
double? trackHeight,
required ui.Image? trackImage,
double enabledThumbRadius = 12.0,
double? disabledThumbRadius,
required ui.Image? thumbImage,
required double value,
double min = 0.0,
double max = 1.0,
int? divisions,
String? label,
FocusNode? focusNode,
bool autoFocus = false,
SliderComponentShape? indicatorShape,
Indicator? indicator,
IndicatorStyle? indicatorStyle,
ShowValueIndicator? showValueIndicator,
TextStyle? indicatorTextStyle,
ValueChanged<double>? onChangeStart,
ValueChanged<double>? onChangeEnd,
ValueChanged<double>? onChanged,
bool disabled = false,
double? width,
double? height,
Color? backgroundColor,
EdgeInsetsGeometry? padding,
EdgeInsetsGeometry? margin,
bool inScroll = false,
}) : this(
key: key,
value: value,
min: min,
max: max,
divisions: divisions,
label: label,
focusNode: focusNode,
autoFocus: autoFocus,
onChangeStart: onChangeStart,
onChanged: onChanged,
onChangeEnd: onChangeEnd,
trackImage: trackImage,
trackHeight: trackHeight,
activeTrackColor: Colors.transparent,
inactiveTrackColor: Colors.transparent,
disabledActiveTrackColor: Colors.transparent,
disabledInactiveTrackColor: Colors.transparent,
thumbImage: thumbImage,
thumbColor: Colors.transparent,
disabledThumbColor: Colors.transparent,
enabledThumbRadius: enabledThumbRadius,
disabledThumbRadius: disabledThumbRadius,
indicatorShape: indicatorShape,
indicator: indicator,
indicatorStyle: indicatorStyle,
showValueIndicator: showValueIndicator,
indicatorTextStyle: indicatorTextStyle,
disabled: disabled,
width: width,
height: height,
backgroundColor: backgroundColor,
padding: padding,
margin: margin,
);