push method

  1. @override
Future<void> push(
  1. ILatLng latLng
)
override

Implementation

@override
Future<void> push(ILatLng latLng) async {
  if (!_isActiveTrip) return;

  if (!_isMultipointAnimation) {
    description.push(latLng);
    await _forward(); //Linear interpolation
  } else if (description.length > description.runExpressAfter) {
    _isMultipointAnimation = true;
    description.clear();
    animatePoints(last: latLng); //Multipoints interpolation
  }
}