TreeSliver<T> constructor

const TreeSliver<T>({
  1. Key? key,
  2. required List<TreeSliverNode<T>> tree,
  3. TreeSliverNodeBuilder treeNodeBuilder = TreeSliver.defaultTreeNodeBuilder,
  4. TreeSliverRowExtentBuilder treeRowExtentBuilder = TreeSliver.defaultTreeRowExtentBuilder,
  5. TreeSliverController? controller,
  6. TreeSliverNodeCallback? onNodeToggle,
  7. AnimationStyle? toggleAnimationStyle,
  8. TreeSliverIndentationType indentation = TreeSliverIndentationType.standard,
  9. bool addAutomaticKeepAlives = true,
  10. bool addRepaintBoundaries = true,
  11. bool addSemanticIndexes = true,
  12. SemanticIndexCallback semanticIndexCallback = _kDefaultSemanticIndexCallback,
  13. int semanticIndexOffset = 0,
  14. int? findChildIndexCallback(
    1. Key
    )?,
})

Creates an instance of a TreeSliver for displaying TreeSliverNodes that animate expanding and collapsing of nodes.

Implementation

const TreeSliver({
  super.key,
  required this.tree,
  this.treeNodeBuilder = TreeSliver.defaultTreeNodeBuilder,
  this.treeRowExtentBuilder = TreeSliver.defaultTreeRowExtentBuilder,
  this.controller,
  this.onNodeToggle,
  this.toggleAnimationStyle,
  this.indentation = TreeSliverIndentationType.standard,
  this.addAutomaticKeepAlives = true,
  this.addRepaintBoundaries = true,
  this.addSemanticIndexes = true,
  this.semanticIndexCallback = _kDefaultSemanticIndexCallback,
  this.semanticIndexOffset = 0,
  this.findChildIndexCallback,
});