TreeView<T> constructor

TreeView<T>({
  1. Key? key,
  2. TreeViewController<T>? controller,
  3. ScrollController? scrollController,
  4. ValueChanged<Key>? onNodeTap,
  5. void onNodeSecondaryTapUp(
    1. Key,
    2. TapUpDetails
    )?,
  6. void onNodeExpansionChanged(
    1. Key,
    2. bool
    )?,
  7. EdgeInsets? padding = EdgeInsets.zero,
  8. ScrollPhysics? physics,
  9. double? iconSize = 12,
  10. bool allowParentSelect = false,
  11. bool supportParentDoubleTap = false,
  12. bool shrinkWrap = false,
  13. TreeViewTheme? theme = const TreeViewTheme.fallback(),
  14. bool primary = true,
  15. double indent = 20,
  16. Widget nodeBuilder(
    1. BuildContext,
    2. Node<T>
    )?,
  17. 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);