addItem method

void addItem(
  1. E item
)

to add an item to the list position will be calculated afterwards

Implementation

void addItem(E item) {
  _nodes.add(Node(data: item));
  calculatePosition();
}