retainWhere method
See Set.retainWhere
Implementation
@override
void retainWhere(bool Function(V element) test) {
List<V> chosen = [];
for (final target in this) {
if (test(target)) {
chosen.add(target);
}
}
clear();
addAll(chosen);
}