dataForTreeNode method
Gets the data associated with each item
Implementation
dynamic dataForTreeNode(TreeNodeItem nodeItem) {
NodeData? nodeData = nodeItem.parent;
if (nodeData == null) {
return data![nodeItem.index!];
}
return nodeData.children[nodeItem.index!];
}