copyWith method

PortServiceInfo copyWith({
  1. String? addr,
  2. int? port,
  3. bool? isLocal,
  4. String? runId,
  5. String? realAddr,
  6. dynamic data,
  7. Map<String, String>? info,
})

Implementation

PortServiceInfo copyWith({String? addr, int? port, bool? isLocal, String? runId, String? realAddr, dynamic data, Map<String, String>? info}) {
  Map<String, String> myinfo ={};
  if(info != null){
    myinfo.addAll(info);
  }else if (this.info != null){
    myinfo.addAll(this.info!);
  }
  return PortServiceInfo(
    addr ?? this.addr,
    port ?? this.port,
    isLocal ?? this.isLocal,
    runId: runId ?? this.runId,
    realAddr: realAddr ?? this.realAddr,
    data: data ?? this.data,
    info: myinfo,
  );
}