TreeView<T> constructor
TreeView<T> ({
- Key? key,
- required List<
TreeViewNode< tree,T> > - TreeViewNodeBuilder<
T> treeNodeBuilder = TreeView.defaultTreeNodeBuilder, - TreeViewRowBuilder<
T> treeRowBuilder = TreeView.defaultTreeRowBuilder, - TreeViewController? controller,
- TreeViewNodeCallback<
T> ? onNodeToggle, - AnimationStyle? toggleAnimationStyle,
- TreeViewIndentationType indentation = TreeViewIndentationType.standard,
- bool? primary,
- Axis mainAxis = Axis.vertical,
- ScrollableDetails verticalDetails = const ScrollableDetails.vertical(),
- ScrollableDetails horizontalDetails = const ScrollableDetails.horizontal(),
- double? cacheExtent,
- DiagonalDragBehavior diagonalDragBehavior = DiagonalDragBehavior.none,
- DragStartBehavior dragStartBehavior = DragStartBehavior.start,
- ScrollViewKeyboardDismissBehavior keyboardDismissBehavior = ScrollViewKeyboardDismissBehavior.manual,
- Clip clipBehavior = Clip.hardEdge,
- bool addAutomaticKeepAlives = true,
- bool addRepaintBoundaries = true,
Creates an instance of a TreeView for displaying TreeViewNodes that animate expanding and collapsing of nodes.
Implementation
TreeView({
super.key,
required this.tree,
this.treeNodeBuilder = TreeView.defaultTreeNodeBuilder,
this.treeRowBuilder = TreeView.defaultTreeRowBuilder,
this.controller,
this.onNodeToggle,
this.toggleAnimationStyle,
this.indentation = TreeViewIndentationType.standard,
this.primary,
this.mainAxis = Axis.vertical,
this.verticalDetails = const ScrollableDetails.vertical(),
this.horizontalDetails = const ScrollableDetails.horizontal(),
this.cacheExtent,
this.diagonalDragBehavior = DiagonalDragBehavior.none,
this.dragStartBehavior = DragStartBehavior.start,
this.keyboardDismissBehavior = ScrollViewKeyboardDismissBehavior.manual,
this.clipBehavior = Clip.hardEdge,
this.addAutomaticKeepAlives = true,
this.addRepaintBoundaries = true,
}) : assert(verticalDetails.direction == AxisDirection.down &&
horizontalDetails.direction == AxisDirection.right);