insertAll method

  1. @override
void insertAll(
  1. int index,
  2. Iterable<T> iterable
)
override

Inserts all objects of iterable at position index in this slice. This increases the length of the slice by the length of iterable and shifts all later objects towards the end of the slice. The underlying list must be growable. The index value must be non-negative and no greater than length. Note, the ranges of other slices on the underlying list will not change, therefore use with care as this may shift the underlying data in other slices.

Implementation

@override
void insertAll(int index, Iterable<T> iterable) {
  final toInsert = iterable.toList();
  _list.insertAll(_start + index, toInsert);
  _end += toInsert.length;
}