copyWith method
NodeFlowEvents<T>
copyWith({
- NodeEvents<
T> ? node, - PortEvents<
T> ? port, - ConnectionEvents<
T> ? connection, - ViewportEvents? viewport,
- AnnotationEvents? annotation,
- ValueChanged<
SelectionState< ? onSelectionChange,T> > - VoidCallback? onInit,
- ValueChanged<
FlowError> ? onError,
Create a new events object with updated values
Implementation
NodeFlowEvents<T> copyWith({
NodeEvents<T>? node,
PortEvents<T>? port,
ConnectionEvents<T>? connection,
ViewportEvents? viewport,
AnnotationEvents? annotation,
ValueChanged<SelectionState<T>>? onSelectionChange,
VoidCallback? onInit,
ValueChanged<FlowError>? onError,
}) {
return NodeFlowEvents<T>(
node: node ?? this.node,
port: port ?? this.port,
connection: connection ?? this.connection,
viewport: viewport ?? this.viewport,
annotation: annotation ?? this.annotation,
onSelectionChange: onSelectionChange ?? this.onSelectionChange,
onInit: onInit ?? this.onInit,
onError: onError ?? this.onError,
);
}