copyWith method

NodeInstance copyWith({
  1. String? id,
  2. Color? color,
  3. Map<String, PortInstance>? ports,
  4. Map<String, FieldInstance>? fields,
  5. NodeState? state,
  6. dynamic onRendered(
    1. NodeInstance node
    )?,
  7. Offset? offset,
})

Implementation

NodeInstance copyWith({
  String? id,
  Color? color,
  Map<String, PortInstance>? ports,
  Map<String, FieldInstance>? fields,
  NodeState? state,
  Function(NodeInstance node)? onRendered,
  Offset? offset,
}) {
  return NodeInstance(
    id: id ?? this.id,
    prototype: prototype,
    ports: ports ?? this.ports,
    state: state ?? this.state,
    fields: fields ?? this.fields,
    offset: offset ?? this.offset,
  );
}