Dart Iterable insertAll()

Dart Iterable insertAll()

·

1 min read

insertAll()

  • Inserts all objects of iterable at position index in this list.

  • This increases the length of the list by the length of iterable and shifts all later objects towards the end of the list.

Example

void main() {
  List<int> nu = [1, 2, 3];
  nu.addAll([4, 5, 6]);
  print(nu.toList());
}
[1, 2, 3, 4, 5, 6]

Exited.