DHSlider.image constructor

DHSlider.image({
  1. Key? key,
  2. double? trackHeight,
  3. required Image? trackImage,
  4. double enabledThumbRadius = 12.0,
  5. double? disabledThumbRadius,
  6. required Image? thumbImage,
  7. required double value,
  8. double min = 0.0,
  9. double max = 1.0,
  10. int? divisions,
  11. String? label,
  12. FocusNode? focusNode,
  13. bool autoFocus = false,
  14. SliderComponentShape? indicatorShape,
  15. Indicator? indicator,
  16. IndicatorStyle? indicatorStyle,
  17. ShowValueIndicator? showValueIndicator,
  18. TextStyle? indicatorTextStyle,
  19. ValueChanged<double>? onChangeStart,
  20. ValueChanged<double>? onChangeEnd,
  21. ValueChanged<double>? onChanged,
  22. bool disabled = false,
  23. double? width,
  24. double? height,
  25. Color? backgroundColor,
  26. EdgeInsetsGeometry? padding,
  27. EdgeInsetsGeometry? margin,
  28. 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,
      );