TreeViewNode<T> constructor

TreeViewNode<T>(
  1. T content, {
  2. List<TreeViewNode<T>>? children,
  3. 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>>[];