checkArgument function

void checkArgument (bool expression, { dynamic message })

Throws an ArgumentError if the given expression is false.

Implementation

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