OverlayPortal constructor

const OverlayPortal({
  1. Key? key,
  2. required OverlayPortalController controller,
  3. required WidgetBuilder overlayChildBuilder,
  4. OverlayChildLocation overlayLocation = OverlayChildLocation.nearestOverlay,
  5. Widget? child,
})

Creates an OverlayPortal that renders the widget overlayChildBuilder builds on the closest Overlay when OverlayPortalController.show is called.

The overlayLocation sets which Overlay this widget attaches the widget returned by overlayChildBuilder to. Defaults to OverlayChildLocation.nearestOverlay.

Implementation

const OverlayPortal({
  super.key,
  required this.controller,
  required this.overlayChildBuilder,
  this.overlayLocation = OverlayChildLocation.nearestOverlay,
  this.child,
});