copyWith method

Attachment copyWith({
  1. String? contentType,
  2. String? language,
  3. String? data,
  4. String? url,
  5. String? size,
  6. String? hash,
  7. String? title,
  8. String? creation,
})

Creates a copy of the Attachment instance and allows for non-destructive mutation.

Implementation

Attachment copyWith({
  String? contentType,
  String? language,
  String? data,
  String? url,
  String? size,
  String? hash,
  String? title,
  String? creation,
}) =>
    Attachment(
      contentType: contentType ?? this.contentType,
      language: language ?? this.language,
      data: data ?? this.data,
      url: url ?? this.url,
      size: size ?? this.size,
      hash: hash ?? this.hash,
      title: title ?? this.title,
      creation: creation ?? this.creation,
    );