TreeNode<T> constructor

TreeNode<T>(
  1. Key key,
  2. T data, [
  3. List<TreeNode<T>>? children,
  4. bool isExpanded = false,
])

Creates a tree node

Implementation

TreeNode(
  this.key,
  this.data, [
  List<TreeNode<T>>? children,
  bool isExpanded = false,
])  : children = children ?? <TreeNode<T>>[],
      isExpanded = ValueNotifier(isExpanded);