W3cubDocs

/Dart 2

removeRange method

void removeRange (int start, int end)
override

Removes the objects in the range start inclusive to end exclusive.

The provided range, given by start and end, must be valid. A range from start to end is valid if 0 <= start <= end <= len, where len is this list's length. The range starts at start and has length end - start. An empty range (with end == start) is valid.

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

Implementation

void removeRange(int start, int end) {
  throw new UnsupportedError("Cannot removeRange on immutable List.");
}

© 2012 the Dart project authors
Licensed under the Creative Commons Attribution-ShareAlike License v4.0.
https://api.dart.dev/stable/2.5.0/dart-html/ImmutableListMixin/removeRange.html