NavigationMenu constructor
const
NavigationMenu({})
Creates a NavigationMenu with the specified items and appearance.
The children
parameter is required and should contain
NavigationMenuItem widgets that define the menu structure.
Appearance properties are optional and will use theme defaults.
Parameters:
surfaceOpacity
(double?, optional): Popover background opacitysurfaceBlur
(double?, optional): Popover backdrop blur intensitychildren
(List
Example:
NavigationMenu(
surfaceOpacity: 0.9,
children: [
NavigationMenuItem(child: Text('Home'), onPressed: _goHome),
NavigationMenuItem(child: Text('About'), onPressed: _showAbout),
],
)
Implementation
const NavigationMenu({
super.key,
this.surfaceOpacity,
this.surfaceBlur,
required this.children,
});