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. ({bool isOutput, String nodeId, String portId})? hoveredPortInfo,
  10. Color? backgroundColor,
  11. Color? selectedBackgroundColor,
  12. Color? borderColor,
  13. Color? selectedBorderColor,
  14. double? borderWidth,
  15. double? selectedBorderWidth,
  16. BorderRadius? borderRadius,
  17. 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.hoveredPortInfo,
  this.backgroundColor,
  this.selectedBackgroundColor,
  this.borderColor,
  this.selectedBorderColor,
  this.borderWidth,
  this.selectedBorderWidth,
  this.borderRadius,
  this.padding,
}) : child = null;