setRange method

  1. @override
void setRange(
  1. int start,
  2. int end,
  3. Iterable<E> from, [
  4. int skipCount = 0,
])
override

Copies end - start elements of the from array, starting from skipCount, into this, starting at start. Throws an UnsupportedError if the list is not extendable.

Implementation

@override
void setRange(int start, int end, Iterable<E> from, [int skipCount = 0]) {
  // NOTE: In case `take()` returns less than `end - start` elements, the
  // _wrappedList will fail with a `StateError`.
  from.skip(skipCount).take(end - start).forEach(check);
  _wrappedList.setRange(start, end, from, skipCount);
}