TreeNode constructor

TreeNode({
  1. required String id,
  2. String label = '',
  3. Object? data,
})

Creates a TreeNode.

Use id to dynamically manage this node later. The TreeViewController.find method can be used to locate any node through its id. TreeNode.find can also be used, but its scope is reduced to its subtree.

Make sure to call TreeViewController.refreshNode to update the view after adding/deleting nodes.

Implementation

TreeNode({required this.id, this.label = '', this.data});