deflate method Null safety

BoxConstraints deflate(
  1. EdgeInsets edges

Returns new box constraints that are smaller by the given edge dimensions.


BoxConstraints deflate(EdgeInsets edges) {
  assert(edges != null);
  final double horizontal = edges.horizontal;
  final double vertical = edges.vertical;
  final double deflatedMinWidth = math.max(0.0, minWidth - horizontal);
  final double 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),