The schema for a single node, generic over its value type T. This is
the customisation surface: a host composes a List<TreeNode<T>> (each with
its own children) to define the whole tree. Immutable — structural edits
in the controller produce new node objects via copyWith, which makes
undo/redo a cheap reference swap.
Static helpers shared by the controller and the view. Each is generic over
the node value type T; the type argument is normally inferred from the
List<TreeNode<T>> you pass in.
One row produced by flattening the tree for the current expansion / filter
state. Carries everything the view needs to paint a single line, including
the ancestor "has a following sibling" flags used to draw the indent
guide-lines (│ ├ └).
Exposes a TreeController to the subtree so any descendant (custom row
content, toolbars built by the host) can read/drive the tree and rebuild
when it changes.