ScribbleState.erasing constructor

const ScribbleState.erasing({
  1. required Sketch sketch,
  2. @Default(ScribblePointerMode.all) ScribblePointerMode allowedPointersMode,
  3. @Default([]) List<int> activePointerIds,
  4. Point? pointerPosition,
  5. @Default(5) double selectedWidth,
  6. @Default(1) double scaleFactor,
})

The state of the scribble widget when the user is currently erasing.

Implementation

const factory ScribbleState.erasing({
  /// The current state of the sketch
  required Sketch sketch,

  /// Which pointers are allowed for drawing and will be captured by the
  /// scribble widget.
  @Default(ScribblePointerMode.all) ScribblePointerMode allowedPointersMode,

  /// The ids of all supported pointers that are currently interacting with
  /// the widget.
  @Default([]) List<int> activePointerIds,

  /// The current position of the pointer
  Point? pointerPosition,

  /// The current width of the pen
  @Default(5) double selectedWidth,

  /// How much the widget is scaled at the moment.
  ///
  /// Can be used if zoom functionality is needed
  /// (e.g. through InteractiveViewer) so that the pen width remains the same.
  @Default(1) double scaleFactor,
}) = Erasing;