copyOldSegmentValues method

  1. @override
void copyOldSegmentValues(
  1. double seriesAnimationFactor,
  2. double segmentAnimationFactor
)
override

Implementation

@override
void copyOldSegmentValues(
    double seriesAnimationFactor, double segmentAnimationFactor) {
  if (series.animationType == AnimationType.loading) {
    points.clear();
    _oldSegmentRect = null;
    segmentRect = null;
    return;
  }

  if (series.animationDuration > 0) {
    _oldSegmentRect =
        RRect.lerp(_oldSegmentRect, segmentRect, animationFactor);
  } else {
    _oldSegmentRect = segmentRect;
  }
}