removeAny static method

void removeAny()

Remove the currently shown context menu from the UI.

Does nothing if no context menu is currently shown.

If a menu is removed, and that menu provided an onRemove callback when it was created, then that callback will be called.

See also:

  • remove, which removes only the current instance.


static void removeAny() {
  _menuOverlayEntry = null;
  if (_shownInstance != null) {
    _shownInstance = null;