TolyDraggableTree<T> constructor

const TolyDraggableTree<T>({
  1. Key? key,
  2. required List<TreeNode<T>> nodes,
  3. required Widget nodeBuilder(
    1. TreeNode<T>
    ),
  4. dynamic onTap(
    1. TreeNode<T>
    )?,
  5. dynamic onExpand(
    1. TreeNode<T>
    )?,
  6. bool canDrop(
    1. TreeNode<T> dragNode,
    2. TreeNode<T>? targetNode,
    3. DropPosition position
    )?,
  7. void onNodeMoved(
    1. DragResult<T> result
    )?,
  8. Widget dragFeedbackBuilder(
    1. TreeNode<T> node
    )?,
  9. Widget childWhenDraggingBuilder(
    1. TreeNode<T> node
    )?,
  10. bool autoExpandOnDrop = true,
  11. bool autoManageNode = true,
  12. double indent = 24.0,
  13. Widget? expandIcon,
  14. Widget? collapseIcon,
  15. Duration animationDuration = const Duration(milliseconds: 200),
  16. Curve animationCurve = Curves.easeInOut,
  17. bool showConnectingLines = false,
  18. Color? connectingLineColor,
  19. double connectingLineWidth = 1.0,
})

Implementation

const TolyDraggableTree({
  super.key,
  required this.nodes,
  required this.nodeBuilder,
  this.onTap,
  this.onExpand,
  this.canDrop,
  this.onNodeMoved,
  this.dragFeedbackBuilder,
  this.childWhenDraggingBuilder,
  this.autoExpandOnDrop = true,
  this.autoManageNode = true,
  this.indent = 24.0,
  this.expandIcon,
  this.collapseIcon,
  this.animationDuration = const Duration(milliseconds: 200),
  this.animationCurve = Curves.easeInOut,
  this.showConnectingLines = false,
  this.connectingLineColor,
  this.connectingLineWidth = 1.0,
});