AppPopupMenu<T> class abstract

Abstract class to create a customized PopupMenuButton.

Constructors

AppPopupMenu({Key? key, List<T>? items, PopupMenuItemBuilder<T>? itemBuilder, T? initialValue, PopupMenuItemSelected<T>? onSelected, PopupMenuCanceled? onCanceled, String? tooltip, double? elevation, EdgeInsetsGeometry? padding = const EdgeInsets.all(8), Widget? child, Widget? icon, Offset? offset = Offset.zero, bool? enabled = true, ShapeBorder? shape, Color? color, bool? captureInheritedThemes = true})
Supply all the properties to instantiate a custom PopupMenuButton.

Properties

captureInheritedThemes bool?
Use inherited themes if set to true.
getter/setter pair
child Widget?
If provided, child is the widget used for this button
getter/setter pair
color Color?
If provided, the background color used for the menu.
getter/setter pair
context BuildContext?
The BuildContext to be used.
getter/setter pair
elevation double?
The z-coordinate at which to place the menu when open. This controls the size of the shadow below the menu.
getter/setter pair
enabled bool?
Whether this popup menu button is interactive.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
icon Widget?
If provided, the icon is used for this button
getter/setter pair
initialValue → T?
The value of the menu item, if any, that should be highlighted when the menu opens.
final
itemBuilder PopupMenuItemBuilder<T>?
The item builder if no List is available.
final
items List<T>?
List of menu items to appear in the popup menu.
final
key Key?
final
override in subclass
no setter
offset Offset?
The offset applied to the Popup Menu Button.
getter/setter pair
onCanceled PopupMenuCanceled?
todo: Shouldn't these all be final? Called when the user dismisses the popup menu without selecting an item.
getter/setter pair
onSelected PopupMenuItemSelected<T>?
Called when a menu item is selected.
final
padding EdgeInsetsGeometry?
Matches IconButton's 8 dps padding by default. In some cases, notably where this button appears as the trailing element of a list item, it's useful to be able to set the padding to zero.
getter/setter pair
popupMenuButton Widget
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
shape ShapeBorder?
If provided, the shape used for the menu.
getter/setter pair
tooltip String?
Text that describes the action that will occur when the button is pressed.
getter/setter pair

Methods

buttonMenu({Key? key, List<T>? items, PopupMenuItemBuilder<T>? itemBuilder, T? initialValue, PopupMenuItemSelected<T>? onSelected, PopupMenuCanceled? onCanceled, String? tooltip, double? elevation, EdgeInsetsGeometry? padding, Widget? child, Widget? icon, Offset? offset, bool? enabled, ShapeBorder? shape, Color? color, bool? captureInheritedThemes}) Widget
errorSnackBar() → void
Provides an error message in a Android's Snack Bar panel.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onCancellation() → void
override in subclass
onCaptureInheritedThemes() bool?
override in subclass
onChild() Widget?
override in subclass
onColor() Color?
override in subclass
onElevation() double?
override in subclass
onEnabled() bool?
override in subclass
onIcon() Widget?
override in subclass
onInitialValue() → T?
override in subclass
onItemBuilder(BuildContext context) List<PopupMenuEntry<T>>
override in subclass
onItems() List<T>?
override in subclass
onOffset() Offset?
override in subclass
onPadding() EdgeInsetsGeometry?
override in subclass
onSelection(T value) → void
override in subclass
onShape() ShapeBorder?
override in subclass
onTooltip() String?
override in subclass
toString() String
A string representation of this object.
inherited

Operators

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