copyWith method
FlowCanvasModel<T, E>
copyWith({
- List<
NodeModel< ? nodes,T, E> > - List<
EdgeConnectionsModel> ? connections,
Implementation
FlowCanvasModel<T, E> copyWith({
List<NodeModel<T, E>>? nodes,
List<EdgeConnectionsModel>? connections,
}) {
return FlowCanvasModel<T, E>(
nodes: nodes ?? this.nodes.map((n) => n.copy()).toList(),
connections: List<EdgeConnectionsModel<E>>.from(
connections ?? this.connections.map((c) => c.copy()).toList(),
),
);
}