ArnaPopupMenuButton class
Displays a menu when pressed.
See also:
- ArnaPopupMenuItem, a popup menu entry for a single value.
- ArnaPopupMenuDivider, a popup menu entry that is just a horizontal line.
- showArnaMenu, a method to dynamically show a popup menu at a given location.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- ArnaPopupMenuButton
Constructors
- ArnaPopupMenuButton({Key? key, required ArnaPopupMenuItemBuilder itemBuilder, IconData? icon, VoidCallback? onOpened, VoidCallback? onClosed, Offset offset = Offset.zero, bool enabled = true, String? tooltipMessage, ButtonType buttonType = ButtonType.normal, bool isFocusable = true, bool autofocus = false, Color? accentColor, MouseCursor cursor = MouseCursor.defer, String? semanticLabel, ArnaPopupMenuPosition position = ArnaPopupMenuPosition.under})
-
Creates a button that shows a popup menu.
const
Properties
- accentColor → Color?
-
The color of the button's focused border.
final
- autofocus → bool
-
Whether this button should focus itself if nothing else is already
focused.
final
-
The type of the button.
final
- cursor → MouseCursor
-
The cursor for a mouse pointer when it enters or is hovering over the
button.
final
- enabled → bool
-
Whether this button is interactive.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- icon → IconData?
-
The icon of the button.
final
- isFocusable → bool
-
Whether this button is focusable or not.
final
- itemBuilder → ArnaPopupMenuItemBuilder
-
Called when the button is pressed to create the items to show in the menu.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- offset → Offset
-
The offset is applied relative to the initial position set by the
position.
final
- onClosed → VoidCallback?
-
Called when the user dismisses the popup menu .
final
- onOpened → VoidCallback?
-
Called when the popup menu is shown.
final
- position → ArnaPopupMenuPosition
-
Whether the popup menu is positioned over or under the popup menu button.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- semanticLabel → String?
-
The semantic label of the button.
final
- tooltipMessage → String?
-
Text that describes the action that will occur when the button is pressed.
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< ArnaPopupMenuButton> -
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}) → 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