lerpTo method

  1. @override
IDataPointStyle lerpTo(
  1. IDataPointStyle next,
  2. double t
)
override

Interpolate between this and next using interpolation factor t (0.0 to 1.0)

Implementation

@override
IDataPointStyle lerpTo(IDataPointStyle next, double t) {
  if (next is! CircleDataPointStyle) return next;

  return CircleDataPointStyle(
    radius: lerpDouble(radius, next.radius, t) ?? next.radius,
    color: Color.lerp(color, next.color, t) ?? next.color,
  );
}