copyWith method Null safety

  1. @override
RoundedRectangleBorder copyWith(
  1. {BorderSide? side,
  2. BorderRadiusGeometry? borderRadius}
)
override

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

Implementation

@override
RoundedRectangleBorder copyWith({ BorderSide? side, BorderRadiusGeometry? borderRadius }) {
  return RoundedRectangleBorder(
    side: side ?? this.side,
    borderRadius: borderRadius ?? this.borderRadius,
  );
}