shouldRepaint method
Determines whether the painter should repaint.
Returns true if any of the visual properties (color, stroke width,
dash length, or dash gap) have changed since the last paint.
Implementation
@override
bool shouldRepaint(CustomPainter oldDelegate) {
return oldDelegate is! DashedCirclePainter ||
oldDelegate.color != color ||
oldDelegate.strokeWidth != strokeWidth ||
oldDelegate.dashLength != dashLength ||
oldDelegate.dashGap != dashGap;
}