removeIf method
Removes an item from a list if a condition is met.
Parameters
condition
: The condition to checkelement
: The element to remove
Implementation
void removeIf(ConditionTester<T> condition, T element) {
for (var item in List<T>.from(this)) {
if (condition(item)) {
remove(element);
}
}
}