Метод insertAll
Вставляет все объекты iterable в позицию index в этом списке.
Это увеличивает длину списка на длину iterable и сдвигает все последующие объекты к концу списка.
Список должен быть изменяемым. Значение index должно быть неотрицательным и не больше длины.
final numbers = <int>[1, 2, 3, 4]; final insertItems = [10, 11]; numbers.insertAll(2, insertItems); print(numbers); // [1, 2, 10, 11, 3, 4]
Реализация
void insertAll(int index, Iterable<E> iterable);
© 2012 the Dart project authors
Licensed under the BSD 3-Clause "New" or "Revised" License.
https://api.dart.dev/stable/2.18.5/dart-core/List/insertAll.html