copyWith method

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

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

Implementation

PopupMenuThemeData copyWith({
  Color? color,
  ShapeBorder? shape,
  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,
    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,
  );
}