paint method
Paints the shape on the given canvas.
This method must be implemented by all concrete shape painters. It should handle the actual drawing logic for the specific shape.
canvas is the canvas to paint on.
size is the size of the canvas.
Implementation
@override
void paint(Canvas canvas, Size size) {
if (applyAfter) {
// Draw the base painter first
basePainter.paint(canvas, size);
// Then apply the blur effect
_applyBlur(canvas, size);
} else {
// Apply the blur effect first
_applyBlur(canvas, size);
// Then draw the base painter
basePainter.paint(canvas, size);
}
}