check function
Asserts that condition is true.
Throws an AssertionError with the provided message if condition is false.
Implementation
/// Asserts that [condition] is `true`.
///
/// Throws an [AssertionError] with the provided [message] if [condition] is `false`.
void check(final bool condition, [final Object? message]) {
if (!condition) {
throw AssertionError(message);
}
}