removeItemAtIndexes method
void
removeItemAtIndexes(
- int index,
- dynamic parent
)
Implementation
void removeItemAtIndexes(int index, dynamic parent) {
if (parent != null && !isExpanded(parent)) {
return;
}
NodeController nodeController =
_rootController!.controllerOfItem(parent)!.childControllers[index];
dynamic child = nodeController.treeNode.item;
int idx = _rootController!.lastVisibleDescendantIndexForItem(child);
if (idx == -1) {
return;
}
NodeController parentController =
_rootController!.controllerOfItem(parent)!;
parentController.removeChildControllers([index]);
}