TreeNode<T> constructor
Creates a tree node with the specified key
, data
, optional children
,
and initial expansion state.
Implementation
TreeNode(
this.key,
this.data, [
List<TreeNode<T>>? children,
bool isExpanded = false,
]) : children = children ?? <TreeNode<T>>[],
_isExpanded = ValueNotifier(isExpanded);