copyWith method

MenuStyle copyWith({
  1. WidgetStateProperty<Color?>? backgroundColor,
  2. WidgetStateProperty<Color?>? shadowColor,
  3. WidgetStateProperty<Color?>? surfaceTintColor,
  4. WidgetStateProperty<double?>? elevation,
  5. WidgetStateProperty<EdgeInsetsGeometry?>? padding,
  6. WidgetStateProperty<Size?>? minimumSize,
  7. WidgetStateProperty<Size?>? fixedSize,
  8. WidgetStateProperty<Size?>? maximumSize,
  9. WidgetStateProperty<BorderSide?>? side,
  10. WidgetStateProperty<OutlinedBorder?>? shape,
  11. WidgetStateProperty<MouseCursor?>? mouseCursor,
  12. VisualDensity? visualDensity,
  13. AlignmentGeometry? alignment,
})

Returns a copy of this MenuStyle with the given fields replaced with the new values.

Implementation

MenuStyle copyWith({
  WidgetStateProperty<Color?>? backgroundColor,
  WidgetStateProperty<Color?>? shadowColor,
  WidgetStateProperty<Color?>? surfaceTintColor,
  WidgetStateProperty<double?>? elevation,
  WidgetStateProperty<EdgeInsetsGeometry?>? padding,
  WidgetStateProperty<Size?>? minimumSize,
  WidgetStateProperty<Size?>? fixedSize,
  WidgetStateProperty<Size?>? maximumSize,
  WidgetStateProperty<BorderSide?>? side,
  WidgetStateProperty<OutlinedBorder?>? shape,
  WidgetStateProperty<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,
  );
}