copyWith method
- MaterialStateProperty<
Color?> ? backgroundColor, - MaterialStateProperty<
Color?> ? shadowColor, - MaterialStateProperty<
Color?> ? surfaceTintColor, - MaterialStateProperty<
double?> ? elevation, - MaterialStateProperty<
EdgeInsetsGeometry?> ? padding, - MaterialStateProperty<
Size?> ? minimumSize, - MaterialStateProperty<
Size?> ? fixedSize, - MaterialStateProperty<
Size?> ? maximumSize, - MaterialStateProperty<
BorderSide?> ? side, - MaterialStateProperty<
OutlinedBorder?> ? shape, - MaterialStateProperty<
MouseCursor?> ? mouseCursor, - VisualDensity? visualDensity,
- AlignmentGeometry? alignment,
Returns a copy of this MenuStyle with the given fields replaced with the new values.
Implementation
MenuStyle copyWith({
MaterialStateProperty<Color?>? backgroundColor,
MaterialStateProperty<Color?>? shadowColor,
MaterialStateProperty<Color?>? surfaceTintColor,
MaterialStateProperty<double?>? elevation,
MaterialStateProperty<EdgeInsetsGeometry?>? padding,
MaterialStateProperty<Size?>? minimumSize,
MaterialStateProperty<Size?>? fixedSize,
MaterialStateProperty<Size?>? maximumSize,
MaterialStateProperty<BorderSide?>? side,
MaterialStateProperty<OutlinedBorder?>? shape,
MaterialStateProperty<MouseCursor?>? mouseCursor,
VisualDensity? visualDensity,
AlignmentGeometry? alignment,
}) {
return MenuStyle(
backgroundColor: backgroundColor ?? this.backgroundColor,
shadowColor: shadowColor ?? this.shadowColor,
surfaceTintColor: surfaceTintColor ?? this.surfaceTintColor,
elevation: elevation ?? this.elevation,
padding: padding ?? this.padding,
minimumSize: minimumSize ?? this.minimumSize,
fixedSize: fixedSize ?? this.fixedSize,
maximumSize: maximumSize ?? this.maximumSize,
side: side ?? this.side,
shape: shape ?? this.shape,
mouseCursor: mouseCursor ?? this.mouseCursor,
visualDensity: visualDensity ?? this.visualDensity,
alignment: alignment ?? this.alignment,
);
}