JsonPopupMenuButton constructor

JsonPopupMenuButton({
  1. Map<String, dynamic> args = const {},
  2. JsonWidgetRegistry? registry,
  3. Clip clipBehavior = Clip.none,
  4. Color? color,
  5. BoxConstraints? constraints,
  6. double? elevation,
  7. bool? enableFeedback,
  8. bool enabled = true,
  9. JsonWidgetData? icon,
  10. Color? iconColor,
  11. double? iconSize,
  12. dynamic initialValue,
  13. required List<PopupMenuEntry> itemBuilder(
    1. BuildContext
    ),
  14. Offset offset = Offset.zero,
  15. void onCanceled()?,
  16. void onOpened()?,
  17. void onSelected(
    1. dynamic
    )?,
  18. EdgeInsetsGeometry padding = const EdgeInsets.all(8.0),
  19. AnimationStyle? popUpAnimationStyle,
  20. PopupMenuPosition? position,
  21. RouteSettings? routeSettings,
  22. Color? shadowColor,
  23. ShapeBorder? shape,
  24. double? splashRadius,
  25. ButtonStyle? style,
  26. Color? surfaceTintColor,
  27. String? tooltip,
  28. bool useRootNavigator = false,
  29. 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,
      );