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() {
  for (OverlayEntry entry in _overlayEntries)
    entry.remove();
  _overlayEntries.clear();
  super.dispose();
}