debugAssertIsValid method

bool debugAssertIsValid()

Implementation

bool debugAssertIsValid() {
  if (minWidth.isInfinite && minHeight.isInfinite) {
    throw AssertionError(
      'BoxConstraints forces an infinite width and infinite height.',
    );
  }
  if (minWidth.isInfinite) {
    throw AssertionError('BoxConstraints forces an infinite width.');
  }
  if (minHeight.isInfinite) {
    throw AssertionError('BoxConstraints forces an infinite height.');
  }
  return true;
}