TreeViewNode<T> constructor
TreeViewNode<T> (
- T content, {
- List<
TreeViewNode< ? children,T> > - bool expanded = false,
Creates a TreeViewNode instance for use in a TreeView.
Implementation
TreeViewNode(
T content, {
List<TreeViewNode<T>>? children,
bool expanded = false,
}) : _expanded = children != null && children.isNotEmpty && expanded,
_content = content,
_children = children ?? <TreeViewNode<T>>[];