Метод removeWhere
-
bool test(
- E элемент
override
Удаляет все объекты из этого списка, которые удовлетворяют test.
Объект o удовлетворяет test, если test(o) равно true.
final numbers = <String>['one', 'two', 'three', 'four']; numbers.removeWhere((item) => item.length == 3); print(numbers); // [three, four]
Список должен быть изменяемым.
Реализация
void removeWhere(bool test(E element)) {
_filter(test, false);
}
© 2012 the Dart project authors
Licensed under the BSD 3-Clause "New" or "Revised" License.
https://api.dart.dev/stable/2.18.5/dart-collection/ListMixin/removeWhere.html