copyWith method

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

Implementation

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