ListRange constructor
Implementation
ListRange(List<int> source, [int offset = 0, int? length])
: _source = source,
_offset = offset,
_length = (length ?? source.length - offset) {
if (_offset < 0 || _offset > _source.length) {
throw RangeError.value(_offset);
}
if (_length < 0) {
throw RangeError.value(_length);
}
if (_length + _offset > _source.length) {
throw RangeError.value(_length + _offset);
}
}