checkNumberRange method

void checkNumberRange(
  1. BigInt value,
  2. BigInt minValue,
  3. BigInt maxValue, [
  4. String? message,
])

Implementation

void checkNumberRange(BigInt value, BigInt minValue, BigInt maxValue, [String? message]) {
    if (value > maxValue || value < minValue) {
      throw ArgumentError(message ?? "Value is out of range");
    }
}