checkArgument function

void checkArgument(
  1. bool expression, {
  2. dynamic message,
})

Throws an ArgumentError if the given expression is false.

Implementation

void checkArgument(bool expression, {message}) {
  if (!expression) {
    throw ArgumentError(_resolveMessage(message, null));
  }
}