Skip to Content
Forui 0.16.0 is released 🎉

Popover

A popover displays rich content in a portal that is aligned to a child.

CLI

To generate and customize this style:

dart run forui style create popover

Usage

FPopover(...)

FPopover( controller: FPopoverController(vsync: this), style: FPopoverStyle(...), popoverAnchor: Alignment.topCenter, childAnchor: Alignment.bottomCenter, constraints: const FPortalConstraints(), spacing: const FPortalSpacing(4), overflow: FPortalOverflow.flip, offset: Offset.zero, groupId: 'popover-group', hideRegion: FPopoverHideRegion.excludeChild, onTapHide: () {}, popoverBuilder: (context, controller) => const Placeholder(), builder: (context, controller, child) => const Placeholder(), child: const Placeholder(), );

Examples

Horizontal Alignment

You can change how the popover is aligned to the button.

Tapping Outside Does Not Close Popover

Blurred Barrier

Flip along Axis

The popover can be flipped along the overflowing axis to stay within the viewport boundaries.

Slide along Axis

The popover can be slid along the overflowing axis to stay within the viewport boundaries.

Allow Overflow

The popover is not shifted to stay within the viewport boundaries, even if it overflows.

Last updated on