MenuBar constructor Null safety
Hover over each field for more details.
Create the MenuBar:
The following 2 fields are necessary: child and barButtons.
The MenuBar is wrapped around a child, i.e. your application under the MenuBar. For the barButtons field, implement a List of BarButton. The buttons in this List are displayed as the buttons on the bar.
Style the MenuBar:
The bar itself: Implement your custom barStyle.
Bar buttons: Implement your custom barButtonStyle.
The menu and submenu itself: Implement your custom menuStyle.
Menu and submenu buttons: Implement your custom menuButtonStyle.
Implementation
const MenuBar({
super.key,
required this.child,
required this.barButtons,
this.barStyle = const BarStyle(),
this.barButtonStyle = const BarButtonStyle(),
this.menuStyle = const MenuStyle(),
this.menuButtonStyle = const MenuButtonStyle(),
this.enabled = true,
});