transform method Null safety

  1. @override
double transform(
  1. double t
)
override

Returns interpolated angles for the current position (t) on timeline.

Implementation

@override
double transform(double t) {
  assert(t >= 0 && t <= 1, 'value must between 0.0 and 1.0');
  if (t == 0.0) return interpolator.begin;
  if (t == 1.0) return interpolator.end;

  return lerp(t);
}