clamp method Null safety

EdgeInsetsGeometry clamp(
  1. EdgeInsetsGeometry min,
  2. EdgeInsetsGeometry max
)

Returns a new EdgeInsetsGeometry object with all values greater than or equal to min, and less than or equal to max.

Implementation

EdgeInsetsGeometry clamp(EdgeInsetsGeometry min, EdgeInsetsGeometry max) {
  return _MixedEdgeInsets.fromLRSETB(
    clampDouble(_left, min._left, max._left),
    clampDouble(_right, min._right, max._right),
    clampDouble(_start, min._start, max._start),
    clampDouble(_end, min._end, max._end),
    clampDouble(_top, min._top, max._top),
    clampDouble(_bottom, min._bottom, max._bottom),
  );
}