toggleExpansion method

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

Implementation

Future<void> toggleExpansion(ITreeNode<Data> item) async {
  if (item.isExpanded) {
    await collapseNode(item);
  } else {
    expandNode(item);
    await applyExpansionBehavior(item);
  }
}