Menubar constructor
const
Menubar({})
Creates a Menubar with horizontal menu layout.
Configures a horizontal menubar that displays menu items and supports dropdown submenus with customizable styling and positioning.
Parameters:
key(Key?): Widget identifier for the widget treechildren(ListpopoverOffset(Offset?, optional): Positioning offset for dropdown menusborder(bool, default: true): Whether to show a border around the menubar
Example:
Menubar(
border: true,
popoverOffset: Offset(0, 8),
children: [
MenuItem(
title: Text('View'),
children: [
MenuItem(title: Text('Zoom In')),
MenuItem(title: Text('Zoom Out')),
MenuDivider(),
MenuItem(title: Text('Full Screen')),
],
),
MenuItem(
title: Text('Tools'),
children: [
MenuItem(title: Text('Preferences')),
MenuItem(title: Text('Extensions')),
],
),
],
)
Implementation
const Menubar({
super.key,
this.popoverOffset,
this.border = true,
required this.children,
});