CustomBilateralSilder constructor
const
CustomBilateralSilder({
- Key? key,
- double initValue = 0,
- double maxValue = 1,
- double minValue = -1,
- double thumbSize = 6,
- Color thumbColor = Colors.blue,
- Duration thumbAnimationDuration = const Duration(milliseconds: 200),
- bool isThumbAnimated = true,
- double trackIndent = 3,
- double trackHeight = 3,
- Color trackColor = Colors.grey,
- Color trackActiveColor = Colors.blue,
- List<
Color> ? trackActiveGradientColors, - List<
double> ? trackActiveGradientStops, - AlignmentGeometry trackActiveGradientBegin = Alignment.centerLeft,
- AlignmentGeometry trackActiveGradientEnd = Alignment.centerRight,
- TileMode trackActiveGradientTileMode = TileMode.clamp,
- bool floatingMark = true,
- double floatingMarkWidth = 1,
- double floatingMarkIndent = 3,
- Color floatingMarkColor = Colors.blue,
- dynamic sliderValueMethod(
- double value
Implementation
const CustomBilateralSilder({
super.key,
this.initValue = 0,
this.maxValue = 1,
this.minValue = -1,
this.thumbSize = 6,
this.thumbColor = Colors.blue,
this.thumbAnimationDuration = const Duration(milliseconds: 200),
this.isThumbAnimated = true,
this.trackIndent = 3,
this.trackHeight = 3,
this.trackColor = Colors.grey,
this.trackActiveColor = Colors.blue,
this.trackActiveGradientColors,
this.trackActiveGradientStops,
this.trackActiveGradientBegin = Alignment.centerLeft,
this.trackActiveGradientEnd = Alignment.centerRight,
this.trackActiveGradientTileMode = TileMode.clamp,
this.floatingMark = true,
this.floatingMarkWidth = 1,
this.floatingMarkIndent = 3,
this.floatingMarkColor = Colors.blue,
this.sliderValueMethod,
}) : assert(initValue <= 1 && initValue >= -1,
'The value range of initValue of the sliding track is a floating point number from -1.0 to 1.0 .'),
assert((maxValue <= 1) && maxValue >= minValue,
'The maxValue of the sliding track is in the range of -1.0 to 1.0 .'),
assert((minValue >= -1) && minValue <= maxValue,
'The minValue of the sliding track is in the range of -1.0 to 1.0 .'),
assert(initValue >= minValue && initValue < maxValue,
'The initial value of the sliding track must be between the maximum value and the minimum value.');