expandOrCollapse method
Click item to expand or contract or collapse
index
The index of the clicked item
Implementation
TreeNode expandOrCollapse(int index) {
var treeNode = treeNodeOfIndex(index);
if (treeNode.expanded) {
collapseItem(treeNode);
} else {
expandItem(treeNode);
}
///notify refresh ListTreeView
notifyListeners();
return treeNode;
}