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