throwIf function

void throwIf(
  1. bool condition,
  2. String message, {
  3. Element? element,
  4. String todo = '',
})

Implementation

void throwIf(bool condition, String message,
    {Element? element, String todo = ''}) {
  if (condition) {
    throwError(message, todo: todo, element: element);
  }
}