replaceRange method

  1. @override
void replaceRange(
  1. int start,
  2. int end,
  3. Iterable<T> newContents
)
override

Removes the objects in the range start inclusive to end exclusive and inserts the contents of newContents in its place. Listeners are notified after all the objects have been replaced.

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

Implementation

@override
void replaceRange(int start, int end, Iterable<T> newContents) {
  assert(_debugAssertNotDisposed());
  _list!.replaceRange(start, end, newContents);
  notifyListeners();
}