PaintedModel constructor

PaintedModel({
  1. required PaintModeE mode,
  2. required List<Offset?> offsets,
  3. required Color color,
  4. required double strokeWidth,
  5. required double opacity,
  6. bool fill = false,
  7. bool hit = false,
})

Creates a new PaintedModel instance.

  • mode: The mode indicating the type of shape or drawing.
  • offsets: The list of offsets representing the points of the shape.
  • color: The color used for drawing or filling.
  • strokeWidth: The width of the stroke used for drawing.
  • opacity: The opacity of the drawing.
  • fill: A boolean indicating whether the shape should be filled.
  • hit: A boolean flag indicating whether this unit of drawing has been hit.

Implementation

PaintedModel({
  required this.mode,
  required this.offsets,
  required this.color,
  required this.strokeWidth,
  required this.opacity,
  this.fill = false,
  this.hit = false,
}) {
  id = generateUniqueId();
}