SeekBar constructor
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 Color sectionUnSelecteColor,
- required double sectionRadius,
- required bool showSectionText,
- required List<
SectionTextModel> sectionTexts, - double sectionTextSize = 14.0,
- required bool afterDragShowSectionText,
- required Color sectionTextColor,
- required Color sectionSelectTextColor,
- int sectionDecimal = 0,
- double sectionTextMarginTop = 4.0,
- bool isRound = true,
- required bool hideBubble,
- required double bubbleRadius,
- required double bubbleHeight,
- required Color bubbleColor,
- Color bubbleTextColor = Colors.white,
- double bubbleTextSize = 14.0,
- double bubbleMargin = 4.0,
- bool bubbleInCenter = false,
- required bool alwaysShowBubble,
- 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,
);