PopupMenuButtonState<T> class
State for a PopupMenuButton.
- Inheritance
-
- Object
- State<
PopupMenuButton< T> > - PopupMenuButtonState
Constructors
Properties
-
The on-screen bounds of the trigger button.
getter/setter pair
- context → BuildContext
-
The location in the tree where this widget builds.
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- isOpen ↔ bool
-
Whether the popup menu is currently open.
getter/setter pair
- mounted → bool
-
Whether this State object is currently in a tree.
no setterinherited
- overlayEntry ↔ OverlayEntry?
-
The overlay entry representing the open menu.
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- selectedIndex ↔ int
-
The index of the currently highlighted menu item.
getter/setter pair
-
widget
→ PopupMenuButton<
T> -
The current configuration.
no setterinherited
Methods
-
build(
BuildContext context) → Widget -
Describes the part of the user interface represented by this widget.
override
-
closeMenu(
) → void - Closes the popup menu.
-
didChangeDependencies(
) → void -
Called when a dependency of this State object changes.
inherited
-
dispose(
) → void -
Called when this object is removed from the tree permanently.
override
-
handleKeyEvent(
KeyEvent event) → void - Handles incoming keyboard events to navigate and interact with the menu.
-
initState(
) → void -
Called when this object is inserted into the tree.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
openMenu(
) → void - Opens the popup menu.
-
selectItem(
int index) → void -
Selects the item at the specified
indexif enabled, and closes the menu. -
setState(
VoidCallback fn) → void -
Notifies the framework that the internal state of this object has changed.
inherited
-
toggleMenu(
) → void - Toggles the popup menu open or closed.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited