JsonPopupMenuButtonBuilderModel class
Creates a button that shows a popup menu.
- Inheritance
-
- Object
- JsonClass
- JsonWidgetBuilderModel
- JsonPopupMenuButtonBuilderModel
Constructors
-
JsonPopupMenuButtonBuilderModel(Map<
String, dynamic> args, {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, RouteSettings? routeSettings, Color? shadowColor, ShapeBorder? shape, double? splashRadius, ButtonStyle? style, Color? surfaceTintColor, String? tooltip, JsonWidgetData? child}) -
const
Properties
-
args
→ Map<
String, dynamic> -
finalinherited
- 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
- 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
- routeSettings → RouteSettings?
-
Optional route settings for the menu.
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
- style → ButtonStyle?
-
Customizes this icon button's appearance.
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
-
Used to determine whether to push the menu to the Navigator furthest
from or nearest to the given
context
.final
Methods
-
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.
override
-
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
Static Methods
-
fromDynamic(
dynamic map, {Map< String, dynamic> args = const {}, JsonWidgetRegistry? registry}) → JsonPopupMenuButtonBuilderModel -
maybeFromDynamic(
dynamic map, {Map< String, dynamic> args = const {}, JsonWidgetRegistry? registry}) → JsonPopupMenuButtonBuilderModel?