showOverlay method

ExtendedOverlayEntry? showOverlay(
  1. Widget widget, {
  2. bool autoOff = false,
})

********* Overlay ********* /// 自定义Overlay

Implementation

/// 自定义Overlay
ExtendedOverlayEntry? showOverlay(Widget widget, {bool autoOff = false}) {
  final OverlayState? overlay =
      GlobalOptions().globalNavigatorKey.currentState!.overlay;
  if (overlay == null) return null;
  final ExtendedOverlayEntry entry =
      ExtendedOverlayEntry(autoOff: autoOff, widget: widget);
  overlay.insert(entry);
  if (!autoOff) _overlayEntryList.add(entry);
  return entry;
}