require function

dynamic require(
  1. bool check,
  2. String message,
  3. String value
)

Throw an ArgumentError with message and value if check is false.

Implementation

require(bool check, String message, String value) {
  if (!check) {
    throw ArgumentError(message, value);
  }
}