collapseNode method

Future<void> collapseNode(
  1. ITreeNode<Data> item
)

Implementation

Future<void> collapseNode(ITreeNode<Data> item) async {
  final removeItems = animatedListStateController.list.where((element) =>
      (element.path).startsWith('${item.path}${INode.PATH_SEPARATOR}'));

  await animatedListStateController.removeAll(removeItems.toList());
  item.expansionNotifier.value = false;
}