copyWith method

DeviceDataDTO copyWith({
  1. int? id,
  2. String? serialNumber,
  3. String? displayName,
  4. AddressDTO? address,
  5. bool? hasServiceAgreement,
  6. ConnectionTypeDTO? connectionType,
})

Implementation

DeviceDataDTO copyWith(
    {int? id,
    String? serialNumber,
    String? displayName,
    AddressDTO? address,
    bool? hasServiceAgreement,
    enums.ConnectionTypeDTO? connectionType}) {
  return DeviceDataDTO(
      id: id ?? this.id,
      serialNumber: serialNumber ?? this.serialNumber,
      displayName: displayName ?? this.displayName,
      address: address ?? this.address,
      hasServiceAgreement: hasServiceAgreement ?? this.hasServiceAgreement,
      connectionType: connectionType ?? this.connectionType);
}