add method

void add(
  1. T value
)

Adds an element to the end of the queue.

Example

final q = Ref(Queue<int>());
q.add(1); // queue: [1]
q.add(2); // queue: [1, 2]

Implementation

void add(T value) {
  $.addLast(value);
  notifyChange();
}