W3cubDocs

/Dart 2

removeAt method

E removeAt (int pos)

Removes the object at position index from this list.

This method reduces the length of this by one and moves all later objects down by one position.

Returns the removed object.

The index must be in the range 0 ≤ index < length.

Throws an UnsupportedError if this is a fixed-length list. In that case the list is not modified.

Implementation

E removeAt(int pos) {
  throw new UnsupportedError("Cannot remove from immutable List.");
}

© 2012 the Dart project authors
Licensed under the Creative Commons Attribution-ShareAlike License v4.0.
https://api.dartlang.org/stable/2.0.0/dart-html/ImmutableListMixin/removeAt.html