copyWith method

MarketingMessageDTO copyWith({
  1. int? id,
  2. MarketingMessageTypeDTO? messageType,
  3. MarketingMessageTargetDTO? target,
  4. List<String>? ccEmails,
  5. List<String>? bccEmails,
  6. String? subject,
  7. String? plainTextBody,
  8. DateTime? creationTimestamp,
  9. bool? isSent,
  10. String? senderEmail,
  11. DateTime? sentTimestamp,
})

Implementation

MarketingMessageDTO copyWith(
    {int? id,
    enums.MarketingMessageTypeDTO? messageType,
    enums.MarketingMessageTargetDTO? target,
    List<String>? ccEmails,
    List<String>? bccEmails,
    String? subject,
    String? plainTextBody,
    DateTime? creationTimestamp,
    bool? isSent,
    String? senderEmail,
    DateTime? sentTimestamp}) {
  return MarketingMessageDTO(
      id: id ?? this.id,
      messageType: messageType ?? this.messageType,
      target: target ?? this.target,
      ccEmails: ccEmails ?? this.ccEmails,
      bccEmails: bccEmails ?? this.bccEmails,
      subject: subject ?? this.subject,
      plainTextBody: plainTextBody ?? this.plainTextBody,
      creationTimestamp: creationTimestamp ?? this.creationTimestamp,
      isSent: isSent ?? this.isSent,
      senderEmail: senderEmail ?? this.senderEmail,
      sentTimestamp: sentTimestamp ?? this.sentTimestamp);
}