withoutIterable method

Iterable<E> withoutIterable(
  1. Iterable<E> other
)

Returns a new iterable with elements from other removed from this iterable.

Example usage:

void main() {
  final numbers = [1, 2, 3, 4, 5];
  final newNumbers = numbers.withoutIterable([2, 4]);
  print(newNumbers); // Output: (1, 3, 5)
}

Implementation

Iterable<E> withoutIterable(Iterable<E> other) => where((e) => !other.contains(e));