transform method

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

Returns the interpolated value for the current value of the given animation.

Implementation

@override
ILatLng transform(double t) {
  //Setting bearing from previous position to avoid sudden flicking markers
  if (t == 0.0) return begin;

  //Setting bearing from previous position to avoid sudden flicking markers
  if (t == 1.0) return end.copyWith(isStopover: true);

  return lerp(t);
}