getIndex method

int getIndex ()

returns index from this node or their parent

Implementation

int getIndex() => _index ?? parent?._index;