copyWith method

MachineBlueprint<S, E> copyWith({
  1. ({String? to})? name,
  2. BasicBlueprint<S, E>? root,
})

Creates a copy of this MachineBlueprint with the specified fields replaced.

Nullable fields use a Record with a named to field to allow setting the field to null.

Implementation

MachineBlueprint<S, E> copyWith({
  ({String? to})? name,
  BasicBlueprint<S, E>? root,
}) {
  return MachineBlueprint(
    name: name != null ? name.to : this.name,
    root: root ?? this.root,
  );
}