JsonPopupMenuButton class

Inheritance

Constructors

JsonPopupMenuButton({Map<String, dynamic> args = const {}, JsonWidgetRegistry? registry, Clip clipBehavior = Clip.none, Color? color, BoxConstraints? constraints, double? elevation, bool? enableFeedback, bool enabled = true, JsonWidgetData? icon, Color? iconColor, double? iconSize, dynamic initialValue, required List<PopupMenuEntry> itemBuilder(BuildContext), Offset offset = Offset.zero, void onCanceled()?, void onOpened()?, void onSelected(dynamic)?, EdgeInsetsGeometry padding = const EdgeInsets.all(8.0), AnimationStyle? popUpAnimationStyle, PopupMenuPosition? position, Color? shadowColor, ShapeBorder? shape, double? splashRadius, Color? surfaceTintColor, String? tooltip, bool useRootNavigator = false, JsonWidgetData? child})

Properties

child JsonWidgetData?
If provided, child is the widget used for this button and the button will utilize an InkWell for taps.
final
clipBehavior Clip
The content will be clipped (or not) according to this option.
final
color Color?
If provided, the background color used for the menu.
final
constraints BoxConstraints?
Optional size constraints for the menu.
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
enableFeedback bool?
Whether detected gestures should provide acoustic and/or haptic feedback.
final
hashCode int
The hash code for this object.
no setterinherited
icon JsonWidgetData?
If provided, the icon is used for this button and the button will behave like an IconButton.
final
iconColor Color?
If provided, this color is used for the button icon.
final
iconSize double?
If provided, the size of the Icon.
final
initialValue → dynamic
The value of the menu item, if any, that should be highlighted when the menu opens.
final
itemBuilder List<PopupMenuEntry> Function(BuildContext)
Called when the button is pressed to create the items to show in the menu.
final
jsonWidgetArgs → dynamic
finalinherited
jsonWidgetBuilder JsonWidgetBuilder Function()
finalinherited
jsonWidgetId String
finalinherited
jsonWidgetListenVariables Set<String>
finalinherited
jsonWidgetRegistry JsonWidgetRegistry
finalinherited
jsonWidgetType String
finalinherited
offset Offset
The offset is applied relative to the initial position set by the position.
final
onCanceled → (void Function()?)
Called when the user dismisses the popup menu without selecting an item.
final
onOpened → (void Function()?)
Called when the popup menu is shown.
final
onSelected → (void Function(dynamic)?)
Called when the user selects a value from the popup menu created by this button.
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.
final
popUpAnimationStyle AnimationStyle?
Used to override the default animation curves and durations of the popup menu's open and close transitions.
final
position PopupMenuPosition?
Whether the popup menu is positioned over or under the popup menu button.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
shadowColor Color?
The color used to paint the shadow below the menu.
final
shape ShapeBorder?
If provided, the shape used for the menu.
final
splashRadius double?
The splash radius.
final
surfaceTintColor Color?
The color used as an overlay on color to indicate elevation.
final
tooltip String?
Text that describes the action that will occur when the button is pressed.
final
useRootNavigator bool
Used to determine whether to push the menu to the Navigator furthest from or nearest to the given context.
final

Methods

build({ChildWidgetBuilder? childBuilder, required BuildContext context, JsonWidgetRegistry? registry}) Widget
Convenience method that can build the widget this data object represents. This is the equilivant of calling: builder.build and passing this in as the data parameter.
inherited
copyWith({dynamic jsonWidgetArgs, JsonWidgetBuilder? jsonWidgetBuilder, Set<String>? jsonWidgetListenVariables, String? jsonWidgetId, JsonWidgetRegistry? jsonWidgetRegistry, String? jsonWidgetType}) JsonWidgetData
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Abstract function that concrete classes must implement. This must encode the internal data model to a JSON compatible representation.
inherited
toString() String
Returns the string encoded JSON representation for this class. This will remove all null values and empty collections from the returned string.
inherited

Operators

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