TreeSliverNode<T> constructor

TreeSliverNode<T>(
  1. T content, {
  2. List<TreeSliverNode<T>>? children,
  3. bool expanded = false,
})

Creates a TreeSliverNode instance for use in a TreeSliver.

Implementation

TreeSliverNode(
  T content, {
  List<TreeSliverNode<T>>? children,
  bool expanded = false,
}) : _expanded = children != null && children.isNotEmpty && expanded,
     _content = content,
     _children = children ?? <TreeSliverNode<T>>[];