calculatePosition method
void
calculatePosition()
call this function when you want to recalculate the positions of the nodes for example if you want to restore the postion after dragging the items around but don't forget to setState after calcutions this function is called automatically when you change the items list
Implementation
void calculatePosition() {
for (Node<E> node in _nodes.where((element) => _getLevel(element) == 1)) {
_calculateNP(node);
}
}