MenuItem.fromChild constructor

MenuItem.fromChild({
  1. Key? key,
  2. Widget? title,
  3. required Widget child,
  4. ShortcutActivator? shortcutActivator,
  5. Intent? intent,
  6. VoidCallback? onPressed,
  7. MenuItemStyle? style,
  8. bool? enabled,
  9. bool closeMenuOnAction = true,
  10. Widget? submenu,
})

Implementation

MenuItem.fromChild({
  Key? key,
  Widget? title,
  required Widget child,
  this.shortcutActivator,
  this.intent,
  this.onPressed,
  this.style,
  this.enabled,
  this.closeMenuOnAction = true,
  this.submenu
}) :
  tileDelegate = MenuItemTileDelegateForChild(title, child),
  super(key: key) {
  assert(configurationIsCorrect());
}