SeekBar constructor

const SeekBar({
  1. Key? key,
  2. ValueChanged<ProgressValue>? onValueChanged,
  3. double min = 0.0,
  4. double max = 100.0,
  5. double? progressHeight,
  6. double value = 0.0,
  7. Color? backgroundColor,
  8. Color? progressColor,
  9. String? semanticsLabel,
  10. String? semanticsValue,
  11. double? indicatorRadius,
  12. Color? indicatorColor,
  13. int? sectionCount,
  14. Color? sectionColor,
  15. Color? sectionUnSelectColor,
  16. double? sectionRadius,
  17. bool? showSectionText,
  18. List<SectionTextModel>? sectionTexts,
  19. double sectionTextSize = 14.0,
  20. bool? afterDragShowSectionText,
  21. Color? sectionTextColor,
  22. Color? sectionSelectTextColor,
  23. int sectionDecimal = 0,
  24. double sectionTextMarginTop = 4.0,
  25. bool isRound = true,
  26. bool? hideBubble,
  27. double? bubbleRadius,
  28. double? bubbleHeight,
  29. Color? bubbleColor,
  30. Color bubbleTextColor = Colors.white,
  31. double bubbleTextSize = 14.0,
  32. double bubbleMargin = 4.0,
  33. bool bubbleInCenter = false,
  34. bool? alwaysShowBubble,
  35. bool isCanTouch = true,
})

Implementation

const SeekBar({
  Key? key,
  ValueChanged<ProgressValue>? onValueChanged,
  double min = 0.0,
  double max = 100.0,
  double? progressHeight,
  double value = 0.0,
  Color? backgroundColor,
  Color? progressColor,
  String? semanticsLabel,
  String? semanticsValue,
  double? indicatorRadius,
  Color? indicatorColor,
  int? sectionCount,
  Color? sectionColor,

  ///间隔圆圈未选中的颜色
  final Color? sectionUnSelectColor,
  double? sectionRadius,
  bool? showSectionText,

  /// 刻度值的数组
  final List<SectionTextModel>? sectionTexts,

  ///刻度值的字体大小
  final double sectionTextSize = 14.0,
  bool? afterDragShowSectionText,

  ///刻度值的字体颜色
  final Color? sectionTextColor,

  ///刻度值的字体颜色
  final Color? sectionSelectTextColor,

  ///刻度值的小数点的位数,默认是0位
  final int sectionDecimal = 0,

  ///刻度值距离进度条的间距
  final double sectionTextMarginTop = 4.0,
  bool isRound = true,
  bool? hideBubble,
  double? bubbleRadius,
  this.bubbleHeight,
  this.bubbleColor,
  this.bubbleTextColor = Colors.white,
  this.bubbleTextSize = 14.0,
  this.bubbleMargin = 4.0,
  this.bubbleInCenter = false,
  this.alwaysShowBubble,
  this.isCanTouch = true,
})  : hideBubble = hideBubble ?? true,
      bubbleRadius = bubbleRadius ?? 20,
      super(
        key: key,
        onValueChanged: onValueChanged,
        min: min,
        max: max,
        progressHeight: progressHeight,
        value: value,
        backgroundColor: backgroundColor,
        progressColor: progressColor,
        semanticsLabel: semanticsLabel,
        semanticsValue: semanticsValue,
        indicatorRadius: indicatorRadius,
        indicatorColor: indicatorColor,
        isRound: isRound,
        sectionCount: sectionCount,
        sectionColor: sectionColor,
        sectionUnSelectColor: sectionUnSelectColor,
        sectionRadius: sectionRadius,
        showSectionText: showSectionText,
        sectionTexts: sectionTexts,
        sectionTextSize: sectionTextSize,
        afterDragShowSectionText: afterDragShowSectionText,
        sectionTextColor: sectionTextColor,
        sectionSelectTextColor: sectionSelectTextColor,
        sectionDecimal: sectionDecimal,
        sectionTextMarginTop: sectionTextMarginTop,
      );