Create a new RangeError for a value being outside the valid range.
The allowed range is from minValue
to maxValue
, inclusive. If minValue
or maxValue
are null
, the range is infinite in that direction.
For a range from 0 to the length of something, end exclusive, use RangeError.index.
An optional name
can specify the argument name that has the invalid value, and the message
can override the default error description.
@pragma("vm:entry-point") RangeError.range(num invalidValue, int minValue, int maxValue, [String name, String message]) : start = minValue, end = maxValue, super.value( invalidValue, name, (message != null) ? message : "Invalid value");
© 2012 the Dart project authors
Licensed under the Creative Commons Attribution-ShareAlike License v4.0.
https://api.dart.dev/stable/2.5.0/dart-core/RangeError/RangeError.range.html