addListener method

void addListener(
  1. MiniSubscription<T> data
)

Implementation

void addListener(MiniSubscription<T> data) {
  var newNode = Node(data: data);

  if (isEmpty) {
    _head = _tail = newNode;
  } else {
    _tail!.next = newNode;
    newNode.prev = _tail;
    _tail = newNode;
  }
  _length++;
}