TreeView<T> constructor
TreeView<T> ({
- Key? key,
- TreeViewController<
T> ? controller, - ScrollController? scrollController,
- ValueChanged<
Key> ? onNodeTap, - void onNodeSecondaryTapUp()?,
- void onNodeExpansionChanged()?,
- EdgeInsets? padding = EdgeInsets.zero,
- ScrollPhysics? physics,
- double? iconSize = 12,
- bool allowParentSelect = false,
- bool supportParentDoubleTap = false,
- bool shrinkWrap = false,
- TreeViewTheme? theme = const TreeViewTheme.fallback(),
- bool primary = true,
- double indent = 20,
- Widget nodeBuilder(
- BuildContext,
- Node<
T>
- Widget empty = const SizedBox.shrink(),
Implementation
TreeView({
Key? key,
TreeViewController<T>? controller,
this.scrollController,
this.onNodeTap,
this.onNodeSecondaryTapUp,
this.onNodeExpansionChanged,
this.padding = EdgeInsets.zero,
this.physics,
this.iconSize = 12,
this.allowParentSelect = false,
this.supportParentDoubleTap = false,
this.shrinkWrap = false,
this.theme = const TreeViewTheme.fallback(),
this.primary = true,
this.indent = 20,
this.nodeBuilder,
this.empty = const SizedBox.shrink(),
}) : controller = controller ?? TreeViewController(),
assert(!debugNodesHaveDuplicateKeys<T>(controller!.children)),
super(key: key);