showExpressivePopover function
Future<void>
showExpressivePopover(
- BuildContext context, {
- required WidgetBuilder builder,
- ExpressiveComponentThemeData? style,
- Rect? anchor,
- ExpressiveMenuPosition position = ExpressiveMenuPosition.below,
- EdgeInsetsGeometry padding = const EdgeInsets.all(ExpressiveSpacing.s16),
- String? label,
Opens a popover of builder's content against anchor, a rectangle in
global coordinates, or against context's own box. Resolves when it
closes.
showExpressivePopover(context, builder: (context) => const Text('Saved to your library'))
Implementation
Future<void> showExpressivePopover(
BuildContext context, {
required WidgetBuilder builder,
ExpressiveComponentThemeData? style,
Rect? anchor,
ExpressiveMenuPosition position = ExpressiveMenuPosition.below,
EdgeInsetsGeometry padding = const EdgeInsets.all(ExpressiveSpacing.s16),
String? label,
}) async {
await _showMenuRoute(
context,
anchor: anchor,
position: position,
label: label,
content: (context) => ExpressivePopoverSurface(
padding: padding,
style: style,
child: builder(context),
),
);
}