avow function

void avow(
  1. bool assertion, [
  2. Object? message
])

a function that recreate the behavior of assert pre-nnbd the positionl bool is necessary to replicated assert

Implementation

// ignore: avoid_positional_boolean_parameters
void avow(bool assertion, [Object? message]) {
  if (!assertion) {
    throw AvowError(message);
  }
}