TreeView<T> constructor

const TreeView<T>({
  1. required List<TreeNode<T>> nodes,
  2. required TreeViewBuilder<T> builder,
  3. required ExpanderBuilder expanderBuilder,
  4. ExpansionChanged<T>? onExpansionChanged,
  5. ValueChanged<TreeNode<T>>? onSelectionChanged,
  6. TreeNode<T>? selectedNode,
  7. Widget indentation = const SizedBox(width: 16),
  8. Key? key,
  9. Curve animationCurve = Curves.easeInOut,
  10. Duration animationDuration = const Duration(milliseconds: 500),
})

Creates a TreeView widget with the specified parameters.

Implementation

const TreeView({
  required this.nodes,
  required this.builder,
  required this.expanderBuilder,
  ExpansionChanged<T>? onExpansionChanged,
  ValueChanged<TreeNode<T>>? onSelectionChanged,
  this.selectedNode,
  this.indentation = const SizedBox(width: 16),
  super.key,
  this.animationCurve = Curves.easeInOut,
  this.animationDuration = const Duration(milliseconds: 500),
})  : _onExpansionChanged = onExpansionChanged ?? _defaultExpansionChanged,
      _onSelectionChanged = onSelectionChanged ?? _defaultSelectionChanged;