collapseAllOtherSiblingNodes method
Implementation
Future<void> collapseAllOtherSiblingNodes(ITreeNode<Data> node) async {
await Future.wait(
(node.parent?.childrenAsList ?? []).map((siblingNode) {
if (siblingNode.key != node.key &&
(siblingNode as ITreeNode).isExpanded) {
return collapseNode(siblingNode as ITreeNode<Data>);
}
return Future.value();
}),
);
}