removeWhere method

void removeWhere(
  1. bool predicate(
    1. T
    )
)

removeWhere method.

Implementation

void removeWhere(bool Function(T) predicate) {
  throwIfDisposed('removeWhere');

  /// Stores the =.
  final current = value;

  /// Stores the =.
  final newList = <T>[];

  /// for method.
  for (final item in current) {
    /// if method.
    if (!predicate(item)) {
      newList.add(item);
    }
  }
  value = newList;
}