toggleExpansion method

void toggleExpansion(
  1. T node
)

Updates the expansion state of node to the opposite state, then calls rebuild.

Implementation

void toggleExpansion(T node) {
  setExpansionState(node, !getExpansionState(node));
  rebuild();
}