remove method

bool remove(
  1. E e
)

Remove a single element that is equal to e.

If there are multiple elements identical to e, only the first will be removed. To remove all, use something like:

set.removeWhere((a) => a == e);

Implementation

bool remove(E e) {
  final bucket = _backingSet.lookup([e]);
  if (bucket == null) {
    return false;
  }
  final result = bucket.remove(e);
  if (result) {
    _length--;
    _backingSet.remove(<E>[]);
  }
  return result;
}