RangePointer constructor

const RangePointer({
  1. Key? key,
  2. double value = 0,
  3. bool enableDragging = false,
  4. ValueChanged<double>? onValueChanged,
  5. ValueChanged<double>? onValueChangeStart,
  6. ValueChanged<double>? onValueChangeEnd,
  7. ValueChanged<ValueChangingArgs>? onValueChanging,
  8. AnimationType animationType = AnimationType.ease,
  9. bool enableAnimation = false,
  10. double animationDuration = 1000,
  11. CornerStyle cornerStyle = CornerStyle.bothFlat,
  12. Gradient? gradient,
  13. double pointerOffset = 0,
  14. GaugeSizeUnit sizeUnit = GaugeSizeUnit.logicalPixel,
  15. double width = 10,
  16. List<double>? dashArray,
  17. 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);