checkGte function

void checkGte(
  1. int value,
  2. int limit, [
  3. Object? label
])

Asserts that value is greater than or equal to limit.

Throws an AssertionError using label as a descriptive name for value.

Implementation

void checkGte(final int value, final int limit, [final Object? label]) {
  if (value < limit) {
    throw AssertionError(
      'The ${label ?? 'value'} $value must be `greater than or equal to` $limit.',
    );
  }
}