MenuButtonStyle constructor Null safety

const MenuButtonStyle(
  1. {bool closeMenuOnClick = true,
  2. Color backgroundColor = Colors.white,
  3. double height = 28.0,
  4. EdgeInsets padding = const EdgeInsets.symmetric(horizontal: 12.0),
  5. TextStyle shortcutTextStyle = const TextStyle(fontSize: 15.0, color: Colors.grey),
  6. bool showSubmenuIcon = true,
  7. Widget submenuIcon = const Icon(Icons.keyboard_arrow_right)}
)

Style the menu and submenu buttons by implementing a custom MenuButtonStyle.

Implementation

const MenuButtonStyle({
  this.closeMenuOnClick = true,
  this.backgroundColor = Colors.white,
  this.height = 28.0,
  this.padding = const EdgeInsets.symmetric(horizontal: 12.0),
  this.shortcutTextStyle =
      const TextStyle(fontSize: 15.0, color: Colors.grey),
  this.showSubmenuIcon = true,
  this.submenuIcon = const Icon(Icons.keyboard_arrow_right),
});