copyWith method
ConnectionEvents<T>
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()?,
- void onConnectEnd(
- bool success
- ConnectionValidationResult onBeforeStart(
- ConnectionStartContext<
T> context
- ConnectionStartContext<
- ConnectionValidationResult onBeforeComplete(
- ConnectionCompleteContext<
T> context
- ConnectionCompleteContext<
Implementation
ConnectionEvents<T> copyWith({
ValueChanged<Connection>? onCreated,
ValueChanged<Connection>? onDeleted,
ValueChanged<Connection?>? onSelected,
ValueChanged<Connection>? onTap,
ValueChanged<Connection>? onDoubleTap,
ValueChanged<Connection>? onMouseEnter,
ValueChanged<Connection>? onMouseLeave,
void Function(Connection connection, Offset position)? onContextMenu,
void Function(String nodeId, String portId, bool isOutput)? onConnectStart,
void Function(bool success)? onConnectEnd,
ConnectionValidationResult Function(ConnectionStartContext<T> context)?
onBeforeStart,
ConnectionValidationResult Function(ConnectionCompleteContext<T> context)?
onBeforeComplete,
}) {
return ConnectionEvents<T>(
onCreated: onCreated ?? this.onCreated,
onDeleted: onDeleted ?? this.onDeleted,
onSelected: onSelected ?? this.onSelected,
onTap: onTap ?? this.onTap,
onDoubleTap: onDoubleTap ?? this.onDoubleTap,
onMouseEnter: onMouseEnter ?? this.onMouseEnter,
onMouseLeave: onMouseLeave ?? this.onMouseLeave,
onContextMenu: onContextMenu ?? this.onContextMenu,
onConnectStart: onConnectStart ?? this.onConnectStart,
onConnectEnd: onConnectEnd ?? this.onConnectEnd,
onBeforeStart: onBeforeStart ?? this.onBeforeStart,
onBeforeComplete: onBeforeComplete ?? this.onBeforeComplete,
);
}