setRange method
Copies the objects of iterable
, skipping skipCount
object first, into
the range start
inclusive to end
exclusive of the list.
Listeners are notified after all the values have been set.
The provided range, given by start
to end
, must be valid.
A range from start
to end
is valid if 0 <= start <= end <= len
, where
len
ist he list's length
. The range starts at start
and has length
end - start
. An empty range (with end == start
) is valid.
The iterable
must have enough objects to fill the range from start
to
end
after skipping skipCount
objects.
If iterable
is this list, the operation copies the elements originally
in the range from skipCount
to skipCount + (end - start)
to the range
start
to end
, even if the two ranges overlap.
If iterable
depends on this list in some other way, no guarantees are made.
Implementation
@override
void setRange(int start, int end, Iterable<T> iterable, [int skipCount = 0]) {
assert(_debugAssertNotDisposed());
_list!.setRange(start, end, iterable, skipCount);
notifyListeners();
}