MenubarTheme class

Theme configuration for Menubar appearance and layout.

MenubarTheme defines the visual styling for menubar components including borders, colors, positioning, and spacing. All properties are optional and fall back to theme defaults when not specified.

The theme controls both the menubar container appearance and the behavior of submenu positioning when menu items are opened.

Example:

ComponentTheme<MenubarTheme>(
  data: MenubarTheme(
    border: true,
    backgroundColor: Colors.white,
    borderColor: Colors.grey,
    borderRadius: BorderRadius.circular(8),
    padding: EdgeInsets.symmetric(horizontal: 8, vertical: 4),
    subMenuOffset: Offset(0, 8),
  ),
  child: Menubar(...),
)

Theme for Menubar.

Constructors

Creates a MenubarTheme.
const

Properties

backgroundColor Color?
Background color of the menubar container.
final
border bool?
Whether to draw a border around the menubar container.
final
borderColor Color?
Color of the border when border is enabled.
final
borderRadius BorderRadiusGeometry?
Border radius for the menubar container corners.
final
hashCode int
The hash code for this object.
no setteroverride
padding EdgeInsetsGeometry?
Internal padding within the menubar container.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
Positioning offset for submenu popovers when menu items are opened.
final

Methods

copyWith({ValueGetter<bool?>? border, ValueGetter<Offset?>? subMenuOffset, ValueGetter<EdgeInsetsGeometry?>? padding, ValueGetter<Color?>? borderColor, ValueGetter<Color?>? backgroundColor, ValueGetter<BorderRadiusGeometry?>? borderRadius}) MenubarTheme
Returns a copy of this theme with the given fields replaced.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
override