SeekBar constructor

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

Implementation

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

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

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

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

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

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

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

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