expandNode method

void expandNode(
  1. ITreeNode<Data> item
)

Implementation

void expandNode(ITreeNode<Data> item) {
  if (item.childrenAsList.isEmpty || item.isExpanded) return;

  animatedListStateController.insertAll(
    animatedListStateController.indexOf(item) + 1,
    List.from(item.childrenAsList),
  );

  item.expansionNotifier.value = true;
  item.cacheChildIndices();
}