getPath method

List<String> getPath()

@returns path of this node

Implementation

List<String> getPath() {
  if (!isNull(_parent)) {
    return [...?_parent?.getPath(), key];
  }

  return [key];
}