copyWith method

CommandTaskDTO copyWith({
  1. String? id,
  2. String? gensetSerialNumber,
  3. CommandTaskStatusDTO? status,
  4. DateTime? requestTimestamp,
  5. CommandTaskRequestDTO? request,
  6. DateTime? responseTimestamp,
  7. CommandTaskResponseDTO? response,
})

Implementation

CommandTaskDTO copyWith(
    {String? id,
    String? gensetSerialNumber,
    enums.CommandTaskStatusDTO? status,
    DateTime? requestTimestamp,
    CommandTaskRequestDTO? request,
    DateTime? responseTimestamp,
    CommandTaskResponseDTO? response}) {
  return CommandTaskDTO(
      id: id ?? this.id,
      gensetSerialNumber: gensetSerialNumber ?? this.gensetSerialNumber,
      status: status ?? this.status,
      requestTimestamp: requestTimestamp ?? this.requestTimestamp,
      request: request ?? this.request,
      responseTimestamp: responseTimestamp ?? this.responseTimestamp,
      response: response ?? this.response);
}