TreeView constructor

const TreeView({
  1. Key? key,
  2. required List<TreeViewItem> items,
  3. TreeViewSelectionMode selectionMode = TreeViewSelectionMode.none,
  4. TreeViewSelectionChangedCallback? onSelectionChanged,
  5. TreeViewItemInvoked? onItemInvoked,
  6. TreeViewItemOnExpandToggle? onItemExpandToggle,
  7. TreeViewItemOnSecondaryTap? onSecondaryTap,
  8. TreeViewItemGesturesCallback? gesturesBuilder,
  9. Widget loadingWidget = kTreeViewLoadingIndicator,
  10. bool shrinkWrap = true,
  11. bool? scrollPrimary,
  12. ScrollController? scrollController,
  13. double? cacheExtent,
  14. double? itemExtent,
  15. bool addRepaintBoundaries = true,
  16. bool usePrototypeItem = false,
  17. bool narrowSpacing = false,
  18. bool includePartiallySelectedItems = false,
  19. bool deselectParentWhenChildrenDeselected = true,
})

Creates a tree view.

items must not be empty

Implementation

const TreeView({
  super.key,
  required this.items,
  this.selectionMode = TreeViewSelectionMode.none,
  this.onSelectionChanged,
  this.onItemInvoked,
  this.onItemExpandToggle,
  this.onSecondaryTap,
  this.gesturesBuilder,
  this.loadingWidget = kTreeViewLoadingIndicator,
  this.shrinkWrap = true,
  this.scrollPrimary,
  this.scrollController,
  this.cacheExtent,
  this.itemExtent,
  this.addRepaintBoundaries = true,
  this.usePrototypeItem = false,
  this.narrowSpacing = false,
  this.includePartiallySelectedItems = false,
  this.deselectParentWhenChildrenDeselected = true,
});