JsonPopupMenuButton constructor
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(), - 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,
Implementation
JsonPopupMenuButton({
Map<String, dynamic> args = const {},
JsonWidgetRegistry? registry,
this.clipBehavior = Clip.none,
this.color,
this.constraints,
this.elevation,
this.enableFeedback,
this.enabled = true,
this.icon,
this.iconColor,
this.iconSize,
this.initialValue,
required this.itemBuilder,
this.offset = Offset.zero,
this.onCanceled,
this.onOpened,
this.onSelected,
this.padding = const EdgeInsets.all(8.0),
this.popUpAnimationStyle,
this.position,
this.routeSettings,
this.shadowColor,
this.shape,
this.splashRadius,
this.style,
this.surfaceTintColor,
this.tooltip,
this.useRootNavigator = false,
this.child,
}) : super(
jsonWidgetArgs: JsonPopupMenuButtonBuilderModel.fromDynamic(
{
'clipBehavior': clipBehavior,
'color': color,
'constraints': constraints,
'elevation': elevation,
'enableFeedback': enableFeedback,
'enabled': enabled,
'icon': icon,
'iconColor': iconColor,
'iconSize': iconSize,
'initialValue': initialValue,
'itemBuilder': itemBuilder,
'offset': offset,
'onCanceled': onCanceled,
'onOpened': onOpened,
'onSelected': onSelected,
'padding': padding,
'popUpAnimationStyle': popUpAnimationStyle,
'position': position,
'routeSettings': routeSettings,
'shadowColor': shadowColor,
'shape': shape,
'splashRadius': splashRadius,
'style': style,
'surfaceTintColor': surfaceTintColor,
'tooltip': tooltip,
'useRootNavigator': useRootNavigator,
'child': child,
...args,
},
args: args,
registry: registry,
),
jsonWidgetBuilder: () => JsonPopupMenuButtonBuilder(
args: JsonPopupMenuButtonBuilderModel.fromDynamic(
{
'clipBehavior': clipBehavior,
'color': color,
'constraints': constraints,
'elevation': elevation,
'enableFeedback': enableFeedback,
'enabled': enabled,
'icon': icon,
'iconColor': iconColor,
'iconSize': iconSize,
'initialValue': initialValue,
'itemBuilder': itemBuilder,
'offset': offset,
'onCanceled': onCanceled,
'onOpened': onOpened,
'onSelected': onSelected,
'padding': padding,
'popUpAnimationStyle': popUpAnimationStyle,
'position': position,
'routeSettings': routeSettings,
'shadowColor': shadowColor,
'shape': shape,
'splashRadius': splashRadius,
'style': style,
'surfaceTintColor': surfaceTintColor,
'tooltip': tooltip,
'useRootNavigator': useRootNavigator,
'child': child,
...args,
},
args: args,
registry: registry,
),
),
jsonWidgetType: JsonPopupMenuButtonBuilder.kType,
);