shouldRepaint method

  1. @override
bool shouldRepaint(
  1. covariant FlutterKnobPainter oldDelegate
)
override

Determines whether the knob should be repainted.

Repaints only if relevant visual or value properties change.

Implementation

@override
bool shouldRepaint(covariant FlutterKnobPainter oldDelegate) {
  return value != oldDelegate.value ||
      minValue != oldDelegate.minValue ||
      maxValue != oldDelegate.maxValue ||
      markerColor != oldDelegate.markerColor ||
      outerRingGradient != oldDelegate.outerRingGradient ||
      innerKnobGradient != oldDelegate.innerKnobGradient ||
      startAngle != oldDelegate.startAngle ||
      endAngle != oldDelegate.endAngle ||
      rotation != oldDelegate.rotation ||
      showLabels != oldDelegate.showLabels;
}