pop method

T pop()

Removes and returns the front element from the queue. Throws a StateError if the queue is empty.

Implementation

T pop() {
  if (empty) {
    throw StateError('Cannot pop from an empty Queue');
  }
  return _container.deleteFront();
}