DropdownButtonState<T> class

State for a DropdownButton.

Inheritance
Implemented types

Constructors

Properties

buttonBounds Rect
The on-screen bounds of the dropdown 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 dropdown 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 selected or highlighted item.
getter/setter pair
widget DropdownButton<T>
The current configuration.
no setterinherited

Methods

build(BuildContext context) Widget
Describes the part of the user interface represented by this widget.
override
closeDropdown() → void
Closes the dropdown 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) bool
Handles incoming keyboard events to navigate and interact with the menu.
override
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
openDropdown() → void
Opens the dropdown menu.
selectItem(int index) → void
Selects the item at the specified index and closes the menu.
setState(VoidCallback fn) → void
Notifies the framework that the internal state of this object has changed.
inherited
toggleDropdown() → void
Toggles the dropdown menu open or closed.
toString() String
A string representation of this object.
inherited
updateSelectedIndex() → void
Synchronizes the selectedIndex with the current DropdownButton.value.

Operators

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