AppPopupMenu class Get started

A popupmenu that takes in String menu options. Imposes rounded corners and the 'under' position

dartdoc:

Inheritance
Available Extensions

Constructors

AppPopupMenu({Key? key, PopupMenuControllerMixin<String>? controller, List<String>? items, List<PopupMenuEntry<String>>? menuEntries, PopupMenuItemBuilder<String>? itemBuilder, String? initialValue, VoidCallback? inOpened, PopupMenuItemSelected<String>? inSelected, PopupMenuCanceled? inCanceled, String? tooltip, double? elevation, EdgeInsetsGeometry? padding, Widget? child, double? splashRadius, Widget? icon, double? iconSize, Offset? offset, bool? enabled, ShapeBorder? shape, Color? color, bool? enableFeedback, BoxConstraints? constraints, PopupMenuPosition? position, Clip? clipBehavior, String? inTooltip()?, double? inElevation()?, EdgeInsetsGeometry? inPadding()?, double? inSplashRadius()?, Widget? inChild()?, Widget? inIcon()?, double? inIconSize()?, Offset? inOffset()?, bool? inEnabled()?, ShapeBorder? inShape()?, Color? inColor()?, bool? inEnableFeedback()?, BoxConstraints? inConstraints()?, PopupMenuPosition? inPosition()?, Clip? inClipBehavior()?})

Properties

child Widget?
If provided, child is the widget used for this button
finalinherited
clipBehavior Clip?
The clip shape of the menu.
finalinherited
color Color?
If provided, the background color used for the menu.
finalinherited
constraints BoxConstraints?
Optional size constraints for the menu.
finalinherited
context BuildContext?
BuildContext property
no setterinherited
elevation double?
The z-coordinate at which to place the menu when open. This controls the size of the shadow below the menu.
finalinherited
enabled bool?
Whether this popup menu button is interactive.
finalinherited
enableFeedback bool?
Whether detected gestures should provide acoustic and/or haptic feedback.
finalinherited
hashCode int
The hash code for this object.
no setterinherited
icon Widget?
If provided, the icon is used for this button
finalinherited
iconSize double?
If provided, the size of the Icon.
finalinherited
inCanceled PopupMenuCanceled?
Called when the user dismisses the popup menu without selecting an item.
finalinherited
inChild → (Widget? Function()?)
'in Parameters' function
finalinherited
inClipBehavior → (Clip? Function()?)
'in Parameters' function
finalinherited
inColor → (Color? Function()?)
'in Parameters' function
finalinherited
inConstraints → (BoxConstraints? Function()?)
'in Parameters' function
finalinherited
inElevation → (double? Function()?)
'in Parameters' function
finalinherited
inEnabled → (bool? Function()?)
'in Parameters' function
finalinherited
inEnableFeedback → (bool? Function()?)
'in Parameters' function
finalinherited
inIcon → (Widget? Function()?)
'in Parameters' function
finalinherited
inIconSize → (double? Function()?)
'in Parameters' function
finalinherited
initialValue String?
The value of the menu item, if any, that should be highlighted when the menu opens.
finalinherited
inOffset → (Offset? Function()?)
'in Parameters' function
finalinherited
inOpened VoidCallback?
Called when the popup menu is shown.
finalinherited
inPadding → (EdgeInsetsGeometry? Function()?)
'in Parameters' function
finalinherited
inPosition → (PopupMenuPosition? Function()?)
'in Parameters' function
finalinherited
inSelected PopupMenuItemSelected<String>?
Called when a menu item is selected.
finalinherited
inShape → (ShapeBorder? Function()?)
'in Parameters' function
finalinherited
inSplashRadius → (double? Function()?)
'in Parameters' function
finalinherited
inTooltip → (String? Function()?)
'in Parameters' function
finalinherited
itemBuilder PopupMenuItemBuilder<String>?
The item builder if no List is available.
finalinherited
items List<String>?
Optional list of menu items to appear in the popup menu.
finalinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
Optional list of PopupMenuEntries to appear in the popup menu.
finalinherited
offset Offset?
The offset applied to the Popup Menu Button. When not set, the Popup Menu Button will be positioned directly next to the button that was used to create it.
finalinherited
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.
finalinherited
position PopupMenuPosition?
Whether the popup menu is positioned over or under the popup menu button. Either PopupMenuPosition.over or PopupMenuPosition.under
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
shape ShapeBorder?
If provided, the shape used for the menu.
finalinherited
splashRadius double?
The splash radius.If null, default splash radius of InkWell or IconButton is used.
finalinherited
tooltip String?
Text that describes the action that will occur when the button is pressed.
finalinherited

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<StatefulWidget>
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
onCanceled() → void
Called when the user dismisses the popup menu without selecting an item.
inherited
onChild() Widget?
The widget used for this button
inherited
onClipBehavior() Clip?
The clip shape of the menu.
inherited
onColor() Color?
The background color used for the menu
inherited
onConstraints() BoxConstraints?
Make the menu wider than the default maximum width
inherited
onElevation() double?
This controls the size of the shadow below the menu.
inherited
onEnabled() bool?
Whether this popup menu button is interactive
inherited
onEnableFeedback() bool?
Whether detected gestures should provide acoustic and/or haptic feedback
inherited
onIcon() Widget?
The icon is used for this button
inherited
onIconSize() double?
the size of the Icon.
inherited
onInitialValue() String?
The value of the menu item, if any, that should be highlighted when the menu opens.
inherited
onItemBuilder() PopupMenuItemBuilder<String>?
Explicitly pass a BuildContext: List<PopupMenuEntry
inherited
onItems() List<String>?
List of menu items of type T to appear in the popup menu.
inherited
onMenuEntries() List<PopupMenuEntry<String>>?
List of menuentry items to appear in the popup menu.
inherited
onOffset() Offset?
The offset is applied relative to the initial position
inherited
onOpened() → void
Called when the popup menu is shown.
inherited
onPadding() EdgeInsetsGeometry?
In some cases, it's useful to be able to set the padding to zero.
inherited
onPosition() PopupMenuPosition?
Whether the menu is positioned over or under the popup menu button PopupMenuPosition.over or PopupMenuPosition.under
inherited
onSelected(String value) → void
Called when the user selects a value from the popup menu created by this button.
inherited
onShape() ShapeBorder?
The shape used for the menu
inherited
onSplashRadius() double?
The splash radius. If null, default splash radius of InkWell or IconButton is used.
inherited
onTooltip() String?
Text that describes the action that will occur when the button is pressed.
inherited
setMenu() → void
Refresh the popup menu
inherited
showButtonMenu() → void
Show the popup menu
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