copyWith method

EmailPayload copyWith({
  1. EmailFrom? from,
  2. List<EmailAccount>? to,
  3. List<EmailAccount>? cc,
  4. List<EmailAccount>? bcc,
  5. String? subject,
  6. String? body,
  7. Map<String, dynamic>? headers,
  8. String? text,
  9. List<EmailAttachment>? attachments,
  10. String? category,
  11. Map<String, dynamic>? variables,
  12. Map<String, dynamic>? tags,
})

Implementation

EmailPayload copyWith({
  EmailFrom? from,
  List<EmailAccount>? to,
  List<EmailAccount>? cc,
  List<EmailAccount>? bcc,
  String? subject,
  String? body,
  Map<String, dynamic>? headers,
  String? text,
  List<EmailAttachment>? attachments,
  String? category,
  Map<String, dynamic>? variables,
  Map<String, dynamic>? tags,
}) =>
    EmailPayload(
      from: from ?? this.from,
      to: to ?? this.to,
      cc: cc ?? this.cc,
      bcc: bcc ?? this.bcc,
      subject: subject ?? this.subject,
      body: body ?? this.body,
      headers: headers ?? this.headers,
      text: text ?? this.text,
      attachments: attachments ?? this.attachments,
      category: category ?? this.category,
      variables: variables ?? this.variables,
      tags: tags ?? this.tags,
    );