expandNode method

void expandNode(
  1. ITreeNode<Data> item
)

Implementation

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

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

  item.expansionNotifier.value = true;
}