copyWith method

  1. @override
SharpBorderRadius copyWith({
  1. Radius? topLeft,
  2. Radius? topRight,
  3. Radius? bottomLeft,
  4. Radius? bottomRight,
})
override

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

Implementation

@override
SharpBorderRadius copyWith({
  Radius? topLeft,
  Radius? topRight,
  Radius? bottomLeft,
  Radius? bottomRight,
}) {
  return SharpBorderRadius.only(
    topLeft: topLeft is SharpRadius ? topLeft : this.topLeft,
    topRight: topRight is SharpRadius ? topRight : this.topRight,
    bottomLeft: bottomLeft is SharpRadius ? bottomLeft : this.bottomLeft,
    bottomRight: bottomRight is SharpRadius ? bottomRight : this.bottomRight,
  );
}