shouldRepaint method

  1. @override
bool shouldRepaint(
  1. ChartData? previous
)
override

Checks if this ChartData needs to repaint with the chart widget's new frame.

Implementation

@override
bool shouldRepaint(ChartData? previous) {
  final ChartAnnotation<T>? previousAnnotation =
      previous as ChartAnnotation<T>?;
  if (isOnRange || isOnRange != previousAnnotation!.isOnRange) {
    return true;
  }

  return false;
}