closeOverlay method

bool closeOverlay({
  1. ExtendedOverlayEntry? entry,
})

关闭最顶层的Overlay

Implementation

bool closeOverlay({ExtendedOverlayEntry? entry}) {
  if (entry != null) {
    return entry.removeEntry();
  } else {
    if (_overlayEntryList.isNotEmpty) {
      return _overlayEntryList.last.removeEntry();
    }
  }
  return false;
}