setRange method
Writes some elements of iterable into a range of this list.
Copies the objects of iterable, skipping skipCount objects first, into the range from start,
inclusive, to end, exclusive, of this slice.
Implementation
@override
void setRange(int start, int end, Iterable<T> iterable, [int skipCount = 0]) {
final (normalizedStart, normalizedEnd) =
_validateAndNormalizeRange(start, end);
final iterator = iterable.skip(skipCount).iterator;
for (int i = normalizedStart; i < normalizedEnd; i++) {
if (!iterator.moveNext()) {
return;
}
_list[i] = iterator.current;
}
}