Range.between constructor
Obtains a range with the specified minimum and maximum values.
The from
parameter must be less than to
parameter,
otherwise ArgumentError will be thrown.
Implementation
factory Range.between(final int from, final int to) {
if (from > to) {
throw ArgumentError('The "from" parameter must be less than "to".');
}
return Range._(from, to);
}