copyWith method

PopupMenuThemeData copyWith({
  1. Color? color,
  2. ShapeBorder? shape,
  3. EdgeInsetsGeometry? menuPadding,
  4. double? elevation,
  5. Color? shadowColor,
  6. Color? surfaceTintColor,
  7. TextStyle? textStyle,
  8. MaterialStateProperty<TextStyle?>? labelTextStyle,
  9. bool? enableFeedback,
  10. MaterialStateProperty<MouseCursor?>? mouseCursor,
  11. PopupMenuPosition? position,
  12. Color? iconColor,
  13. double? iconSize,
})

Creates a copy of this object with the given fields replaced with the new values.

Implementation

PopupMenuThemeData copyWith({
  Color? color,
  ShapeBorder? shape,
  EdgeInsetsGeometry? menuPadding,
  double? elevation,
  Color? shadowColor,
  Color? surfaceTintColor,
  TextStyle? textStyle,
  MaterialStateProperty<TextStyle?>? labelTextStyle,
  bool? enableFeedback,
  MaterialStateProperty<MouseCursor?>? mouseCursor,
  PopupMenuPosition? position,
  Color? iconColor,
  double? iconSize,
}) {
  return PopupMenuThemeData(
    color: color ?? this.color,
    shape: shape ?? this.shape,
    menuPadding: menuPadding ?? this.menuPadding,
    elevation: elevation ?? this.elevation,
    shadowColor: shadowColor ?? this.shadowColor,
    surfaceTintColor: surfaceTintColor ?? this.surfaceTintColor,
    textStyle: textStyle ?? this.textStyle,
    labelTextStyle: labelTextStyle ?? this.labelTextStyle,
    enableFeedback: enableFeedback ?? this.enableFeedback,
    mouseCursor: mouseCursor ?? this.mouseCursor,
    position: position ?? this.position,
    iconColor: iconColor ?? this.iconColor,
    iconSize: iconSize ?? this.iconSize,
  );
}