NodeWidget<T>.defaultStyle constructor
const
NodeWidget<T>.defaultStyle ({
- Key? key,
- required Node<
T> node, - required NodeFlowController<
T> controller, - NodeShape? shape,
- List<
Connection> connections = const [], - void onPortTap()?,
- void onPortHover()?,
- void onPortContextMenu()?,
- Color? backgroundColor,
- Color? selectedBackgroundColor,
- Color? borderColor,
- Color? selectedBorderColor,
- double? borderWidth,
- double? selectedBorderWidth,
- BorderRadius? borderRadius,
- EdgeInsets? padding,
- PortBuilder<
T> ? portBuilder, - VoidCallback? onTap,
- VoidCallback? onDoubleTap,
- void onContextMenu(
- Offset globalPosition
- VoidCallback? onMouseEnter,
- VoidCallback? onMouseLeave,
- 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;