lastVisibleDescendantIndexForItem method

int lastVisibleDescendantIndexForItem(
  1. dynamic item
)

Implementation

int lastVisibleDescendantIndexForItem(dynamic item) {
  if (this.treeNode.item == item) {
    return this.lastVisibleDescendatIndex;
  }

  for (NodeController nodeController in childControllers) {
    int lastIndex = nodeController.lastVisibleDescendantIndexForItem(item);
    if (lastIndex != -1) {
      return lastIndex;
    }
  }
  return -1;
}