clamp method
Returns this Radius, with values clamped to the given min and max Radius values.
The min
value defaults to Radius.circular(-double.infinity)
, and
the max
value defaults to Radius.circular(double.infinity)
.
Implementation
Radius clamp({Radius? minimum, Radius? maximum}) {
minimum ??= const Radius.circular(-double.infinity);
maximum ??= const Radius.circular(double.infinity);
return Radius.elliptical(
clampDouble(x, minimum.x, maximum.x),
clampDouble(y, minimum.y, maximum.y),
);
}