addTreeData<T extends TreeData> static method

dynamic addTreeData<T extends TreeData>(
  1. List<TreeVO<T>> list,
  2. T treeData
)

Implementation

static addTreeData<T extends TreeData>(List<TreeVO<T>> list, T treeData) {
  TreeVO<T> treeVO = TreeVO<T>(data: treeData);
  if (treeData.checked != null) {
    treeVO.checked = treeData.checked;
  }
  findChildren(list, treeVO);
  findParent(list, treeVO);
  list.add(treeVO);
}