GetPopupMenu<T extends Object> class

Displays a menu when pressed and calls onSelected when the menu is dismissed because an item was selected. The value passed to onSelected is the value of the selected menu item.

Inheritance
Available Extensions

Constructors

GetPopupMenu({GetPopupMenuChildBuilder? childBuilder, GetPopupMenuItemBuilder<T>? itemBuilder, GetPopupMenuSeparatorBuilder<T>? separatorBuilder, GetPopupMenuItemSelected<T>? onSelected, VoidCallback? onCanceled, required List<T> items, int? initialSelected, double elevation = 12, double cornerRadius = 16, double? itemHeight = 36, double? itemPadding = 4, double? titleSize = 14, double? accessorySize = 20, Color? tintColor, Color? backgroundColor, EdgeInsets padding = const EdgeInsets.symmetric(horizontal: 12), Offset? offset, bool enabled = true, bool autoTint = false, bool separator = true, bool useRootNavigator = false, String? semanticLabel, Key? key})
Creates a widget that shows a popup menu.
const

Properties

accessorySize double?
final
autoTint bool
final
backgroundColor Color?
If provided, the background color used for the menu.
final
childBuilder GetPopupMenuChildBuilder?
If provided, childBuilder is the widget used for this button
final
cornerRadius double
final
elevation double
The z-coordinate at which to place the menu when open. This controls the size of the shadow below the menu.
final
enabled bool
Whether this popup menu button is interactive.
final
hashCode int
The hash code for this object.
no setterinherited
initialSelected int?
The value of the menu item, if any, that should be highlighted when the menu opens.
final
itemBuilder GetPopupMenuItemBuilder<T>?
Called when the button is pressed to create the items to show in the menu.
final
itemHeight double?
final
itemPadding double?
final
items List<T>
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
offset Offset?
The offset applied to the Popup Menu Button.
final
onCanceled VoidCallback?
Called when the user dismisses the popup menu without selecting an item.
final
onSelected GetPopupMenuItemSelected<T>?
Called when the user selects a value from the popup menu.
final
padding EdgeInsets
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
semanticLabel String?
final
separator bool
final
separatorBuilder GetPopupMenuSeparatorBuilder<T>?
final
tintColor Color?
final
titleSize double?
final
useRootNavigator bool
final

Methods

build(BuildContext context) Widget
Describes the part of the user interface represented by this widget.
override
createElement() StatelessElement
Creates a StatelessElement to manage this widget's location in the tree.
inherited
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