shouldRepaint method
Determines whether the painter should repaint.
Returns true if any of the triangle's properties (color, style, or stroke width) have changed since the last paint, triggering a repaint.
Implementation
@override
bool shouldRepaint(TrianglePainter oldDelegate) {
return oldDelegate.strokeColor != strokeColor ||
oldDelegate.paintingStyle != paintingStyle ||
oldDelegate.strokeWidth != strokeWidth;
}