copyWithInsertedAll method
Returns a copy with items inserted at index
Implementation
List<T> copyWithInsertedAll(int index, Iterable<T> items) {
if (index < 0 || index > length) {
throw RangeError('Index $index out of bounds for list of length $length');
}
return [...sublist(0, index), ...items, ...sublist(index)];
}