dispose method

  1. @override
void dispose ()
override

The route should remove its overlays and free any other resources.

This route is no longer referenced by the navigator.

Implementation

@override
void dispose() {
  assert(!_transitionCompleter.isCompleted, 'Cannot dispose a $runtimeType twice.');
  _controller?.dispose();
  _transitionCompleter.complete(_result);
  super.dispose();
}