TreeNode<T> constructor

TreeNode<T>({
  1. required String id,
  2. required T data,
  3. List<TreeNode<T>>? children,
  4. bool isExpanded = false,
  5. bool isSelected = false,
  6. int level = 0,
  7. bool selectable = true,
  8. bool? isLeaf,
  9. bool isLoading = false,
})

Implementation

TreeNode({
  required this.id,
  required this.data,
  List<TreeNode<T>>? children,
  this.isExpanded = false,
  this.isSelected = false,
  this.level = 0,
  this.selectable = true,
  this.isLeaf,
  this.isLoading = false,
}) : children = children ?? [];