Tree<T> constructor

const Tree<T>({
  1. Key? key,
  2. List<TreeNode<T>>? roots,
  3. TreeController<T>? controller,
  4. Set<TreeNodeId>? initiallyExpanded,
  5. bool showToolbar = true,
  6. bool showSearch = true,
  7. bool showCheckboxes = false,
  8. bool showFooter = true,
  9. bool showGuides = true,
  10. bool dense = false,
  11. bool editable = true,
  12. TreeIconBuilder<T>? iconBuilder,
  13. TreeWidgetBuilder<T>? trailingBuilder,
  14. TreeWidgetBuilder<T>? labelBuilder,
  15. TreeActionsBuilder<T>? contextActions,
  16. ValueChanged<TreeNode<T>>? onSelected,
  17. ValueChanged<TreeNode<T>>? onActivated,
  18. ValueChanged<Set<TreeNodeId>>? onCheckedChanged,
  19. ValueChanged<List<TreeNode<T>>>? onChanged,
  20. Widget? emptyState,
})

Implementation

const Tree({
  super.key,
  this.roots,
  this.controller,
  this.initiallyExpanded,
  this.showToolbar = true,
  this.showSearch = true,
  this.showCheckboxes = false,
  this.showFooter = true,
  this.showGuides = true,
  this.dense = false,
  this.editable = true,
  this.iconBuilder,
  this.trailingBuilder,
  this.labelBuilder,
  this.contextActions,
  this.onSelected,
  this.onActivated,
  this.onCheckedChanged,
  this.onChanged,
  this.emptyState,
}) : assert(roots != null || controller != null, 'Provide roots or a controller.');