PlinthMenubar class
A horizontal bar of menus, desktop-style, matching Mantine's
Menubar.
The behaviour that makes a menubar a menubar rather than a row of PlinthMenus: once one menu is open, moving the pointer across the bar opens the next one without a second click. A row of independent menus makes you click, dismiss, click again, which is wrong for a File/Edit/View bar in a way that's hard to name until you use one.
Only one menu is open at a time, and the bar owns that — which is also why the controllers live here rather than being passed in.
PlinthMenubar(
menus: [
PlinthMenubarMenu(label: 'File', items: [...]),
PlinthMenubarMenu(label: 'Edit', items: [...]),
],
)
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- PlinthMenubar
Constructors
- PlinthMenubar({Key? key, PlinthSize size = PlinthSize.sm, String? color, PlinthSize? radius})
-
const
Properties
- color → String?
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
-
final
- radius → PlinthSize?
-
Overrides the theme's default radius for this one instance.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- size → PlinthSize
-
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< PlinthMenubar> -
Creates the mutable state for this widget at a given location in the tree.
override
-
debugDescribeChildren(
) → List< DiagnosticsNode> -
Returns a list of DiagnosticsNode objects describing this node's
children.
inherited
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringDeep(
{String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String -
Returns a string representation of this node and its descendants.
inherited
-
toStringShallow(
{String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a one-line detailed description of the object.
inherited
-
toStringShort(
) → String -
A short, textual description of this widget.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited