TreeView constructor
const
TreeView({
- Key? key,
- required List<
TreeViewItem> items, - TreeViewSelectionMode selectionMode = TreeViewSelectionMode.none,
- TreeViewSelectionChangedCallback? onSelectionChanged,
- TreeViewItemInvoked? onItemInvoked,
- TreeViewItemOnExpandToggle? onItemExpandToggle,
- TreeViewItemOnSecondaryTap? onSecondaryTap,
- TreeViewItemGesturesCallback? gesturesBuilder,
- Widget loadingWidget = kTreeViewLoadingIndicator,
- bool shrinkWrap = true,
- bool? scrollPrimary,
- ScrollController? scrollController,
- double? cacheExtent,
- double? itemExtent,
- bool addRepaintBoundaries = true,
- bool usePrototypeItem = false,
- bool narrowSpacing = false,
- bool includePartiallySelectedItems = false,
- 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,
});