retainAll method

void retainAll(
  1. Iterable<T> elements
)

Retains only elements that exist in elements.

final s = Ref({1, 2, 3, 4});
s.retainAll([2, 4, 6]); // -> {2, 4}

Implementation

void retainAll(Iterable<T> elements) {
  $.retainAll(elements);
  notifyChange();
}