copyWith method

PortSpec copyWith({
  1. PortNum? num,
  2. String? type,
  3. List<EndpointSpec>? endpoints,
  4. String? liveness,
  5. bool? public,
  6. bool? published,
})

Implementation

PortSpec copyWith({PortNum? num, String? type, List<EndpointSpec>? endpoints, String? liveness, bool? public, bool? published}) {
  return PortSpec(
    num: num ?? this.num,
    type: type ?? this.type,
    endpoints: endpoints ?? List<EndpointSpec>.from(this.endpoints),
    liveness: liveness ?? this.liveness,
    published: published ?? this.published,
    public: public ?? this.public,
  );
}