A base class for entries in a material design popup menu.

The popup menu widget uses this interface to interact with the menu items. To show a popup menu, use the showMenu function. To create a button that shows a popup menu, consider using PopupMenuButton.

The type T is the type of the value the entry represents. All the entries in a given menu must represent values with consistent types.

See also:

Inheritance
Implemented by

Constructors

PopupMenuEntry({Key key })

Abstract const constructor. This constructor enables subclasses to provide const constructors so that they can be used in const expressions.

const

Properties

enabled bool

Whether the user is permitted to select this entry.

read-only
height double

The amount of vertical space occupied by this entry.

read-only
value → T

The value that should be returned by showMenu when the user selects this entry.

read-only
hashCode int

Get a hash code for this object.

read-only, inherited
key Key

Controls how one widget replaces another widget in the tree.

read-only, inherited
runtimeType Type

A representation of the runtime type of the object.

read-only, inherited

Operators

operator ==(other) bool

The equality operator.

inherited

Methods

createElement() StatefulElement

Creates a StatefulElement to manage this widget's location in the tree.

inherited
createState() State

Creates the mutable state for this widget at a given location in the tree.

inherited
debugFillDescription(List<String> description) → void

Add additional information to the given description for use by toString.

inherited
noSuchMethod(Invocation invocation) → dynamic

Invoked when a non-existent method or property is accessed.

inherited
toString() String

Returns a string representation of this object.

inherited
toStringShort() String

A short, textual description of this widget.

inherited