showMenu<T> static method
Future<T?>
showMenu<T>({
- required BuildContext context,
- required RelativeRect position,
- required List<
PopupMenuEntry< items,T> > - T? initialValue,
- double? elevation,
- Color? shadowColor,
- Color? surfaceTintColor,
- String? semanticLabel,
- ShapeBorder? shape,
- Color? color,
- BoxConstraints? constraints,
- Clip clipBehavior = Clip.none,
- RouteSettings? routeSettings,
Show a popup menu and hide banner while open
Implementation
static Future<T?> showMenu<T>({
required BuildContext context,
required RelativeRect position,
required List<PopupMenuEntry<T>> items,
T? initialValue,
double? elevation,
Color? shadowColor,
Color? surfaceTintColor,
String? semanticLabel,
ShapeBorder? shape,
Color? color,
bool useRootNavigator = false,
BoxConstraints? constraints,
Clip clipBehavior = Clip.none,
RouteSettings? routeSettings,
}) async {
final blocker = _openOverlay();
try {
return await material.showMenu<T>(
context: context,
position: position,
items: items,
initialValue: initialValue,
elevation: elevation,
shadowColor: shadowColor,
surfaceTintColor: surfaceTintColor,
semanticLabel: semanticLabel,
shape: shape,
color: color,
useRootNavigator: useRootNavigator,
constraints: constraints,
clipBehavior: clipBehavior,
routeSettings: routeSettings,
);
} finally {
_closeOverlay(blocker);
}
}