length property

int get length

Returns the length of this list

Implementation

int get length {
  var length = 0;
  var currentNode = _head;

  while (currentNode != null) {
    currentNode = currentNode.next;
    length++;
  }
  return length;
}