copyWith method

Attachment copyWith(
  1. {String? id,
  2. String? type,
  3. String? titleLink,
  4. String? title,
  5. String? thumbUrl,
  6. String? text,
  7. String? pretext,
  8. String? ogScrapeUrl,
  9. String? imageUrl,
  10. String? footerIcon,
  11. String? footer,
  12. dynamic fields,
  13. String? fallback,
  14. String? color,
  15. String? authorName,
  16. String? authorLink,
  17. String? authorIcon,
  18. String? assetUrl,
  19. List<Action>? actions,
  20. int? originalWidth,
  21. int? originalHeight,
  22. AttachmentFile? file,
  23. UploadState? uploadState,
  24. Map<String, Object?>? extraData}
)

Implementation

Attachment copyWith({
  String? id,
  String? type,
  String? titleLink,
  String? title,
  String? thumbUrl,
  String? text,
  String? pretext,
  String? ogScrapeUrl,
  String? imageUrl,
  String? footerIcon,
  String? footer,
  dynamic fields,
  String? fallback,
  String? color,
  String? authorName,
  String? authorLink,
  String? authorIcon,
  String? assetUrl,
  List<Action>? actions,
  int? originalWidth,
  int? originalHeight,
  AttachmentFile? file,
  UploadState? uploadState,
  Map<String, Object?>? extraData,
}) =>
    Attachment(
      id: id ?? this.id,
      type: type ?? this.type,
      titleLink: titleLink ?? this.titleLink,
      title: title ?? this.title,
      thumbUrl: thumbUrl ?? this.thumbUrl,
      text: text ?? this.text,
      pretext: pretext ?? this.pretext,
      ogScrapeUrl: ogScrapeUrl ?? this.ogScrapeUrl,
      imageUrl: imageUrl ?? this.imageUrl,
      footerIcon: footerIcon ?? this.footerIcon,
      footer: footer ?? this.footer,
      fields: fields ?? this.fields,
      fallback: fallback ?? this.fallback,
      color: color ?? this.color,
      authorName: authorName ?? this.authorName,
      authorLink: authorLink ?? this.authorLink,
      authorIcon: authorIcon ?? this.authorIcon,
      assetUrl: assetUrl ?? this.assetUrl,
      actions: actions ?? this.actions,
      originalWidth: originalWidth ?? this.originalWidth,
      originalHeight: originalHeight ?? this.originalHeight,
      file: file ?? this.file,
      uploadState: uploadState ?? this.uploadState,
      extraData: extraData ?? this.extraData,
    );