NodeWidget<T>.defaultStyle constructor

const NodeWidget<T>.defaultStyle({
  1. Key? key,
  2. required Node<T> node,
  3. required NodeFlowController<T> controller,
  4. NodeShape? shape,
  5. List<Connection> connections = const [],
  6. void onPortTap(
    1. String nodeId,
    2. String portId,
    3. bool isOutput
    )?,
  7. void onPortHover(
    1. String nodeId,
    2. String portId,
    3. bool isHover
    )?,
  8. void onPortContextMenu(
    1. String nodeId,
    2. String portId,
    3. ScreenPosition screenPosition
    )?,
  9. Color? backgroundColor,
  10. Color? selectedBackgroundColor,
  11. Color? borderColor,
  12. Color? selectedBorderColor,
  13. double? borderWidth,
  14. double? selectedBorderWidth,
  15. BorderRadius? borderRadius,
  16. EdgeInsets? padding,
  17. PortBuilder<T>? portBuilder,
  18. VoidCallback? onTap,
  19. VoidCallback? onDoubleTap,
  20. void onContextMenu(
    1. ScreenPosition screenPosition
    )?,
  21. VoidCallback? onMouseEnter,
  22. VoidCallback? onMouseLeave,
  23. double portSnapDistance = 8.0,
})

Creates a node widget with default content layout.

This constructor uses the standard node rendering which displays the node type as a title and node ID as content.

Parameters are the same as the default constructor, except child is always null.

Implementation

const NodeWidget.defaultStyle({
  super.key,
  required this.node,
  required this.controller,
  this.shape,
  this.connections = const [],
  this.onPortTap,
  this.onPortHover,
  this.onPortContextMenu,
  this.backgroundColor,
  this.selectedBackgroundColor,
  this.borderColor,
  this.selectedBorderColor,
  this.borderWidth,
  this.selectedBorderWidth,
  this.borderRadius,
  this.padding,
  this.portBuilder,
  this.onTap,
  this.onDoubleTap,
  this.onContextMenu,
  this.onMouseEnter,
  this.onMouseLeave,
  this.portSnapDistance = 8.0,
}) : child = null;