isCollapsed static method
If this node is collapsed, given a BuildContext.
Implementation
static bool isCollapsed(BuildContext context) {
final _TreeNodeCollapse? result =
context.dependOnInheritedWidgetOfExactType<_TreeNodeCollapse>();
if (result == null) {
throw Exception('Must have a node with children in the tree.');
}
return result._collapsed;
}