check function

void check(
  1. bool condition,
  2. String message
)

Assert a condition, throwing AssertionError with message on failure.

Implementation

void check(bool condition, String message) {
  if (!condition) {
    throw AssertionError(message);
  }
}