NodeWidget<T>.defaultStyle constructor

const NodeWidget<T>.defaultStyle({
  1. Key? key,
  2. required Node<T> node,
  3. NodeShape? shape,
  4. List<Connection> connections = const [],
  5. void onPortTap(
    1. String nodeId,
    2. String portId,
    3. bool isOutput
    )?,
  6. void onPortHover(
    1. String nodeId,
    2. String portId,
    3. bool isHover
    )?,
  7. void onNodeTap(
    1. String nodeId
    )?,
  8. void onNodeDoubleTap(
    1. String nodeId
    )?,
  9. void onNodeMouseEnter(
    1. String nodeId
    )?,
  10. void onNodeMouseLeave(
    1. String nodeId
    )?,
  11. void onNodeContextMenu(
    1. String nodeId,
    2. Offset position
    )?,
  12. ({bool isOutput, String nodeId, String portId})? hoveredPortInfo,
  13. Color? backgroundColor,
  14. Color? selectedBackgroundColor,
  15. Color? borderColor,
  16. Color? selectedBorderColor,
  17. double? borderWidth,
  18. double? selectedBorderWidth,
  19. BorderRadius? borderRadius,
  20. EdgeInsets? padding,
})

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,
  this.shape,
  this.connections = const [],
  this.onPortTap,
  this.onPortHover,
  this.onNodeTap,
  this.onNodeDoubleTap,
  this.onNodeMouseEnter,
  this.onNodeMouseLeave,
  this.onNodeContextMenu,
  this.hoveredPortInfo,
  this.backgroundColor,
  this.selectedBackgroundColor,
  this.borderColor,
  this.selectedBorderColor,
  this.borderWidth,
  this.selectedBorderWidth,
  this.borderRadius,
  this.padding,
}) : child = null;