Foundation

Overlay

A low-level overlay primitive that composites content relative to a child widget.

This widget is typically used to create other high-level widgets. Use:

  • FPortal to anchor at a child widget's edges (e.g. a dropdown below a button).
  • FPointPortal to anchor at a coordinate inside a child (e.g. a context menu at the cursor).

Usage

FOverlay(...)

1FOverlay(
2 overlayLocation: .nearestOverlay,
3 overlay: const [Positioned(top: 42, left: 0, child: Text('Overlay content'))],
4 overlayBuilder: (context, controller, childRenderBox, overlay) => overlay,
5 builder: (context, controller, child) => child!,
6 child: const Text('Child'),
7)

On this page