addFirst method Null safety

  1. @override
void addFirst(
  1. E element
)
override

Adds value at the beginning of the queue.

Implementation

@override
void addFirst(E element) {
  _head = (_head - 1) & (_table.length - 1);
  _table[_head] = element;
  if (_head == _tail) _grow();
}