copyWithInsertAll method

List<E> copyWithInsertAll(
  1. int index,
  2. List<E> elements
)

Copy current list with adding all elements at the position of new list.

Error throwed due to a value being outside a valid range.

Implementation

List<E> copyWithInsertAll(int index, List<E> elements) =>
    List.from(this)..insertAll(index, elements);