copyWith method

MenuItemStyle copyWith({
  1. MenuItemMaterialStateProperty<Color>? overlayColor,
  2. double? minHeight,
  3. EdgeInsetsDirectional? padding,
  4. double? largeStartPadding,
  5. StartPaddingStyle? startPaddingStyle,
  6. double? contentsVertSpacing,
  7. double? contentsMinHorzSpacing,
  8. TextStyle? shortcutLabelTextStyle,
  9. AssetImage? arrowIconAsset,
  10. double? arrowIconSize,
  11. IconThemeData? iconStyle,
})

Implementation

MenuItemStyle copyWith({
  MenuItemMaterialStateProperty<Color>? overlayColor,
  double? minHeight,
  EdgeInsetsDirectional? padding,
  double? largeStartPadding,
  StartPaddingStyle? startPaddingStyle,
  double? contentsVertSpacing,
  double? contentsMinHorzSpacing,
  TextStyle? shortcutLabelTextStyle,
  AssetImage? arrowIconAsset,
  double? arrowIconSize,
  IconThemeData? iconStyle
}) {
  return MenuItemStyle(
    overlayColor: MenuItemMaterialStateProperty.merge(this.overlayColor, overlayColor),
    minHeight: minHeight ?? this.minHeight,
    padding: padding ?? this.padding,
    largeStartPadding: largeStartPadding ?? this.largeStartPadding,
    startPaddingStyle: startPaddingStyle ?? this.startPaddingStyle,
    contentsVertSpacing: contentsVertSpacing ?? this.contentsVertSpacing,
    contentsMinHorzSpacing: contentsMinHorzSpacing ?? this.contentsMinHorzSpacing,
    shortcutLabelTextStyle: shortcutLabelTextStyle ?? this.shortcutLabelTextStyle,
    arrowIconAsset: arrowIconAsset ?? this.arrowIconAsset,
    arrowIconSize: arrowIconSize ?? this.arrowIconSize,
    iconStyle: iconStyle ?? this.iconStyle
  );
}