Overlay

Popover Menu

A popover menu displays a menu in a portal aligned to a child.

CLI

To generate a specific style for customization:

dart run forui style create popover-menu

Usage

FPopoverMenu(...)

1FPopoverMenu(
2 style: const .delta(maxWidth: 250),
3 faded: null,
4 divider: .full,
5 menu: [
6 .group(
7 children: [
8 .item(title: const Text('Edit'), onPress: () {}),
9 .item(title: const Text('Delete'), onPress: () {}),
10 ],
11 ),
12 ],
13 menuBuilder: (context, controller, menu) => menu!,
14 builder: (context, controller, child) => child!,
15 child: FButton(onPress: () {}, child: const Text('Menu')),
16)

FPopoverMenu.tiles(...)

1FPopoverMenu.tiles(
2 style: const .delta(maxWidth: 250),
3 faded: null,
4 divider: .full,
5 menu: [
6 .group(
7 children: [
8 .tile(title: const Text('Edit'), onPress: () {}),
9 .tile(title: const Text('Delete'), onPress: () {}),
10 ],
11 ),
12 ],
13 menuBuilder: (context, controller, menu) => menu!,
14 builder: (context, controller, child) => child!,
15 child: FButton(onPress: () {}, child: const Text('Menu')),
16)

Examples

Nested Submenu

Tiles

Blurred Barrier

On this page