drawOnCanvas method
Draw the shape on the specified canvas.
Implementation
@override
void drawOnCanvas(Canvas canvas, Rect rectangle, Paint paint) {
canvas.drawRRect(
RRect.fromRectAndRadius(rectangle.inflate(spreadRadius), radius),
paint);
}