detachItems method
- bool predicate(
- T
Detach items from a list according to a function and return these items
Implementation
Iterable<T> detachItems([bool Function(T)? predicate]) {
predicate = predicate ?? (x) => true;
var items = where(predicate);
removeWhere((e) => items.contains(e));
return items;
}