copyWith method

ModbusSerialConnectionDTO copyWith({
  1. String? name,
  2. int? baudRate,
  3. ParityDTO? parity,
  4. int? dataBits,
  5. StopBitsDTO? stopBits,
  6. int? unitId,
  7. String? propertySpec,
})

Implementation

ModbusSerialConnectionDTO copyWith(
    {String? name,
    int? baudRate,
    enums.ParityDTO? parity,
    int? dataBits,
    enums.StopBitsDTO? stopBits,
    int? unitId,
    String? propertySpec}) {
  return ModbusSerialConnectionDTO(
      name: name ?? this.name,
      baudRate: baudRate ?? this.baudRate,
      parity: parity ?? this.parity,
      dataBits: dataBits ?? this.dataBits,
      stopBits: stopBits ?? this.stopBits,
      unitId: unitId ?? this.unitId,
      propertySpec: propertySpec ?? this.propertySpec);
}