bool remove(Object o)

Remove a single instance of value from the queue.

Returns true if a value was removed, or false if the queue contained no element equal to value.

Source

bool remove(Object o) {
  _DoubleLinkedQueueEntry<E> entry = _sentinel._nextLink;
  while (!identical(entry, _sentinel)) {
    if (entry.element == o) {
      entry._remove();
      _elementCount--;
      return true;
    }
    entry = entry._nextLink;
  }
  return false;
}