copyWith method Null safety
- {Color? color,
- ShapeBorder? shape,
- double? elevation,
- TextStyle? textStyle,
- bool? enableFeedback,
- MaterialStateProperty<
MouseCursor?> ? mouseCursor}
Creates a copy of this object with the given fields replaced with the new values.
Implementation
PopupMenuThemeData copyWith({
Color? color,
ShapeBorder? shape,
double? elevation,
TextStyle? textStyle,
bool? enableFeedback,
MaterialStateProperty<MouseCursor?>? mouseCursor,
}) {
return PopupMenuThemeData(
color: color ?? this.color,
shape: shape ?? this.shape,
elevation: elevation ?? this.elevation,
textStyle: textStyle ?? this.textStyle,
enableFeedback: enableFeedback ?? this.enableFeedback,
mouseCursor: mouseCursor ?? this.mouseCursor,
);
}