throwIf function

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

Implementation

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