copyWith method

NodeFlowEvents<T> copyWith({
  1. NodeEvents<T>? node,
  2. PortEvents<T>? port,
  3. ConnectionEvents<T>? connection,
  4. ViewportEvents? viewport,
  5. AnnotationEvents? annotation,
  6. ValueChanged<SelectionState<T>>? onSelectionChange,
  7. VoidCallback? onInit,
  8. 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,
  );
}