ConnectionEvents<T> class
Events related to connection interactions
Constructors
-
ConnectionEvents({ValueChanged<
Connection> ? onCreated, ValueChanged<Connection> ? onDeleted, ValueChanged<Connection?> ? onSelected, ValueChanged<Connection> ? onTap, ValueChanged<Connection> ? onDoubleTap, ValueChanged<Connection> ? onMouseEnter, ValueChanged<Connection> ? onMouseLeave, void onContextMenu(Connection connection, Offset position)?, void onConnectStart(String nodeId, String portId, bool isOutput)?, void onConnectEnd(bool success)?, ConnectionValidationResult onBeforeStart(ConnectionStartContext<T> context)?, ConnectionValidationResult onBeforeComplete(ConnectionCompleteContext<T> context)?}) -
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
-
onBeforeComplete
→ ConnectionValidationResult Function(ConnectionCompleteContext<
T> context)? -
Validation callback before completing a connection to a target port
Return ConnectionValidationResult with allowed: false to prevent connection
final
-
onBeforeStart
→ ConnectionValidationResult Function(ConnectionStartContext<
T> context)? -
Validation callback before starting a connection from a port
Return ConnectionValidationResult with allowed: false to prevent connection start
final
- onConnectEnd → void Function(bool success)?
-
Called when connection creation ends (whether successful or cancelled)
Parameters indicate if a connection was successfully created
final
- onConnectStart → void Function(String nodeId, String portId, bool isOutput)?
-
Called when starting to create a connection from a port
Useful for showing UI hints or validation messages
final
- onContextMenu → void Function(Connection connection, Offset position)?
-
Called on secondary tap on a connection (right-click/long-press for context menu)
Receives both the connection and the pointer position for menu placement
final
-
onCreated
→ ValueChanged<
Connection> ? -
Called when a connection is created
final
-
onDeleted
→ ValueChanged<
Connection> ? -
Called when a connection is deleted
final
-
onDoubleTap
→ ValueChanged<
Connection> ? -
Called when a connection is double-tapped
final
-
onMouseEnter
→ ValueChanged<
Connection> ? -
Called when mouse enters a connection's path
final
-
onMouseLeave
→ ValueChanged<
Connection> ? -
Called when mouse leaves a connection's path
final
-
onSelected
→ ValueChanged<
Connection?> ? -
Called when a connection's selection state changes
Receives the selected connection, or null if selection was cleared
final
-
onTap
→ ValueChanged<
Connection> ? -
Called when a connection is tapped
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
copyWith(
{ValueChanged< Connection> ? onCreated, ValueChanged<Connection> ? onDeleted, ValueChanged<Connection?> ? onSelected, ValueChanged<Connection> ? onTap, ValueChanged<Connection> ? onDoubleTap, ValueChanged<Connection> ? onMouseEnter, ValueChanged<Connection> ? onMouseLeave, void onContextMenu(Connection connection, Offset position)?, void onConnectStart(String nodeId, String portId, bool isOutput)?, void onConnectEnd(bool success)?, ConnectionValidationResult onBeforeStart(ConnectionStartContext<T> context)?, ConnectionValidationResult onBeforeComplete(ConnectionCompleteContext<T> context)?}) → ConnectionEvents<T> -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited