BoxConstraints constructor Null safety

const BoxConstraints(
  1. {double minWidth,
  2. double maxWidth,
  3. double minHeight,
  4. double maxHeight}
)

Creates box constraints with the given constraints.

Implementation

const BoxConstraints({
  this.minWidth = 0.0,
  this.maxWidth = double.infinity,
  this.minHeight = 0.0,
  this.maxHeight = double.infinity,
}) : assert(minWidth != null),
     assert(maxWidth != null),
     assert(minHeight != null),
     assert(maxHeight != null);