animatePoints method

void animatePoints(
  1. List<ILatLng> list, {
  2. ILatLng last = const ILatLng.empty(),
  3. Curve curve = Curves.linear,
})

Implementation

void animatePoints(
  List<ILatLng> list, {
  ILatLng last = const ILatLng.empty(),
  Curve curve = Curves.linear,
}) {
  if (list.isNotEmpty) {
    _locationCtrller.removeStatusListener(_statusListener);

    var multiPoint = LocationTween(interpolator: PolynomialLocationInterpolator(points: list));

    _swappingValue(last);

    _isResseting = true;

    _locationCtrller.addStatusListener(_statusListenerPoints);

    _proxyAnim.parent = multiPoint.curvedAnimate(
      curve: curve,
      controller: _locationCtrller,
    );

    _locationCtrller.resetAndForward();
  }
}