PopupMenuOption class

A class that represents an option in a popup menu.

Each option can display an icon and either a widget or text label. When the option is tapped, a specified action is executed.

Constructors

PopupMenuOption({required dynamic onTap(), required Widget icon, Widget? child, String? label})
Creates a PopupMenuOption.

Properties

child Widget?
The widget to be displayed as the content of the menu option.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
icon Widget
The icon to be displayed alongside the menu option.
getter/setter pair
label String?
The text label to be displayed for the menu option.
getter/setter pair
onTap ↔ dynamic Function()
The callback function to be executed when the menu option is tapped.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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