dataForTreeNode method

dynamic dataForTreeNode(
  1. TreeNodeItem nodeItem
)

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!];
}