abort method

void abort()

Tears the flight down without animation.

Implementation

void abort() {
  if (!_finished) {
    _finished = true;
    controller.removeListener(_onTick);
    _revealTagIfAirborne();
    _removeHistoryEntry();
    _historyRoute = null;
    _removeEntry();
    _disposeSnapshot();
    _disposeDrag();
    controller.stop();
    scope.retireFlight(this);
    if (!_closedCompleter.isCompleted) {
      _closedCompleter.complete(_result);
    }
  }
  // Disposing the controller is deferred to the scope's retire
  // mechanism: external listeners (a HUD, derived animations) may
  // still be subscribed, and a synchronous dispose would break their
  // removeListener.
}