WidgetPointer constructor

const WidgetPointer({
  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. GaugeSizeUnit offsetUnit = GaugeSizeUnit.logicalPixel,
  12. double offset = 0,
  13. required Widget child,
})

Create a widget pointer with the default or required properties.

The arguments child, value, offset, must not be null and animationDuration must be non-negative.

Implementation

const WidgetPointer({
  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.offsetUnit = GaugeSizeUnit.logicalPixel,
  this.offset = 0,
  required this.child,
}) : assert(
       animationDuration > 0,
       'Animation duration must be a non-negative value.',
     ),
     super(key: key, child: child);