OverlayScope constructor

const OverlayScope({
  1. Key? key,
  2. required Component child,
  3. required String id,
})

A component that registers its child with _OverlayScopeRegistry.

This component does not render anything itself but allows its child to be rendered in a different part of the DOM tree. It is used to scope overlays to a specific part of the application, allowing for better organization and management of overlays.

Example

OverlayScope(
  id: 'my-scope',
  child: MyComponent(),
);

Implementation

const OverlayScope({
  super.key,
  required this.child,
  required this.id,
});