RangePointer constructor
const
RangePointer({
- Key? key,
- double value = 0,
- bool enableDragging = false,
- ValueChanged<
double> ? onValueChanged, - ValueChanged<
double> ? onValueChangeStart, - ValueChanged<
double> ? onValueChangeEnd, - ValueChanged<
ValueChangingArgs> ? onValueChanging, - AnimationType animationType = AnimationType.ease,
- bool enableAnimation = false,
- double animationDuration = 1000,
- CornerStyle cornerStyle = CornerStyle.bothFlat,
- Gradient? gradient,
- double pointerOffset = 0,
- GaugeSizeUnit sizeUnit = GaugeSizeUnit.logicalPixel,
- double width = 10,
- List<
double> ? dashArray, - Color? color,
Create a range pointer with the default or required properties.
The arguments value
, pointerOffset
, must not be null and
animationDuration
, width
, must be non-negative.
Implementation
const RangePointer(
{Key? key,
this.value = 0,
this.enableDragging = false,
this.onValueChanged,
this.onValueChangeStart,
this.onValueChangeEnd,
this.onValueChanging,
this.animationType = AnimationType.ease,
this.enableAnimation = false,
this.animationDuration = 1000,
this.cornerStyle = CornerStyle.bothFlat,
this.gradient,
this.pointerOffset = 0,
this.sizeUnit = GaugeSizeUnit.logicalPixel,
this.width = 10,
this.dashArray,
this.color})
: assert(
animationDuration > 0, 'Animation duration must be non-negative'),
assert(width >= 0, 'Width must be a non-negative value.'),
assert(
(gradient != null && gradient is SweepGradient) || gradient == null,
'The gradient must be null or else the gradient must be equal to '
'sweep gradient.'),
super(key: key);