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