removeFromOverlay method

  1. @visibleForTesting
void removeFromOverlay()

Remove the OverlayEntry from the Overlay.

This method removes the OverlayEntry synchronously, regardless of exit animation: this leads to abrupt removals of OverlayEntrys with animations.

To allow the OverlayEntry to play its exit animation, consider calling hide instead, with removeFromOverlay set to true, and optionally await the returned Future.

Implementation

@visibleForTesting
void removeFromOverlay() {
  _overlayEntry?.remove();
  _overlayEntry?.dispose();
  _overlayEntry = null;
}