copyWith method
- 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,
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,
);
}