ExpansionChanged<T> typedef

ExpansionChanged<T> = void Function(TreeNode<T> node, bool expanded)

Callback function when a node expands or collapses.

Example:

void onExpand(TreeNode<String> node, bool expanded) {
  print('Node ${node.data} is now ${expanded ? 'expanded' : 'collapsed'}');
}

Implementation

typedef ExpansionChanged<T> = void Function(TreeNode<T> node, bool expanded);