replaceAll method

void replaceAll(
  1. Iterable<T> elements
)

Replaces all elements in the list and notifies listeners. It's preferred to calling .clear() then .addAll(), because it only notifies listeners once.

Implementation

void replaceAll(Iterable<T> elements) {
  _rawList = <T>[];
  _rawList.addAll(elements);
  _listChanged();
}