copyWith method

PortInstance copyWith({
  1. dynamic data,
  2. Set<Link>? links,
  3. PortState? state,
  4. Offset? offset,
})

Implementation

PortInstance copyWith({
  dynamic data,
  Set<Link>? links,
  PortState? state,
  Offset? offset,
}) {
  final instance = PortInstance(
    prototype: prototype,
    state: state ?? this.state,
    offset: offset ?? this.offset,
  );

  instance.links = links ?? this.links;

  return instance;
}