deflate method
Returns new box constraints that are smaller by the given edge dimensions.
Implementation
BoxConstraints deflate(EdgeInsets edges) {
final horizontal = edges.horizontal;
final vertical = edges.vertical;
final deflatedMinWidth = math.max(0.0, minWidth - horizontal);
final deflatedMinHeight = math.max(0.0, minHeight - vertical);
return BoxConstraints(
minWidth: deflatedMinWidth,
maxWidth: math.max(deflatedMinWidth, maxWidth - horizontal),
minHeight: deflatedMinHeight,
maxHeight: math.max(deflatedMinHeight, maxHeight - vertical));
}