MenuButton constructor
const
MenuButton({})
Creates a menu button.
Parameters:
child(Widget, required): Main contentsubMenu(List<MenuItem>?): Optional nested submenuonPressed(ContextedCallback?): Click handlertrailing(Widget?): Trailing widgetleading(Widget?): Leading icon or widgetenabled(bool): Whether enabled, defaults to truefocusNode(FocusNode?): Focus nodeautoClose(bool): Auto-close behavior, defaults to trueoverlayController(OverlayController?): Optional popover controller
Implementation
const MenuButton({
super.key,
required this.child,
this.subMenu,
this.onPressed,
this.trailing,
this.leading,
this.enabled = true,
this.focusNode,
this.autoClose = true,
this.overlayController,
});