operator + method
Binary addition operator.
Returns a radius whose x value is the sum of the x values of the two operands, and whose y value is the sum of the y values of the two operands.
Implementation
@override
Radius operator +(Radius other) {
if (other is SharpRadius) {
return SharpRadius(
cornerRadius: cornerRadius + other.cornerRadius,
sharpRatio: (sharpRatio + other.sharpRatio) / 2,
);
}
return SharpRadius(
cornerRadius: cornerRadius + other.x,
sharpRatio: sharpRatio,
);
}