copyWith method
Returns a copy of this OutlinedBorder that draws its outline with the
specified side, if side is non-null.
Implementation
@override
MaterialShapeBorder copyWith({
RoundedPolygon? shape,
BorderSide? side,
double? squash,
}) {
if (shape != null) {
return MaterialShapeBorder(
shape: shape,
side: side ?? this.side,
squash: squash ?? this.squash,
);
}
final oldShape = this.shape;
if (oldShape != null) {
return MaterialShapeBorder(
shape: oldShape,
side: side ?? this.side,
squash: squash ?? this.squash,
);
}
return MaterialShapeBorder._fromCubics(
cubics: _cubics,
side: side ?? this.side,
squash: squash ?? this.squash,
);
}