drawObject method

  1. @override
void drawObject(
  1. Canvas canvas,
  2. Size size
)
override

Draws the arrow on the provided canvas of size size.

Implementation

@override
void drawObject(Canvas canvas, Size size) {
  final drawingSize = this.size * scale;
  canvas.drawRRect(
      RRect.fromRectAndCorners(
        Rect.fromCenter(
            center: position,
            width: drawingSize.width,
            height: drawingSize.height),
        topLeft: borderRadius.topLeft,
        topRight: borderRadius.topRight,
        bottomLeft: borderRadius.bottomLeft,
        bottomRight: borderRadius.bottomRight,
      ),
      paint);
}