DesignMenuBar class
A row of menus.
DesignMenuBar(menus: [DesignMenuEntry(label: 'File', children: [DesignMenuEntry(label: 'New', onPressed: () {})])], itemBuilder: (context, entry, level, states) => Text(entry.label), surfaceBuilder: (context, info, items) => Column(mainAxisSize: MainAxisSize.min, children: items))
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- DesignMenuBar
Constructors
-
DesignMenuBar({Key? key, required DesignMenuItemBuilder itemBuilder, required DesignMenuSurfaceBuilder surfaceBuilder, WidgetBuilder? dividerBuilder, Widget barBuilder(BuildContext context, List<
Widget> items)?, String? semanticLabel, bool highlightFollowsPointer = true}) -
A menubar of
menus(each with DesignMenuEntry.children).const
Properties
-
barBuilder
→ Widget Function(BuildContext context, List<
Widget> items)? -
Paints the bar around its top items; null: a row.
final
- dividerBuilder → WidgetBuilder?
-
Paints a divider; null: a 1 px gap.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- highlightFollowsPointer → bool
-
Whether a pointer over a menu item moves the keys there; true by
default, as on every desktop.
final
- itemBuilder → DesignMenuItemBuilder
-
Paints a top item or a menu item.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
-
The top menus.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- semanticLabel → String?
-
What a screen reader calls the bar; null:
DesignLocalizations.menuBarLabel.
final
- surfaceBuilder → DesignMenuSurfaceBuilder
-
Paints a menu's panel around its
items(scroll them when DesignOverlayInfo.maxSize is short).final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< DesignMenuBar> -
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.
override
-
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