MediaAttachment constructor

const MediaAttachment({
  1. required String id,
  2. required MediaAttachmentType type,
  3. String? url,
  4. required String previewUrl,
  5. String? remoteUrl,
  6. required MediaMeta meta,
  7. String? description,
  8. @JsonKey(name: 'blurhash') String? blurHash,
})

Implementation

const factory MediaAttachment({
  /// The ID of the attachment in the database.
  required String id,

  /// The type of the attachment.
  required MediaAttachmentType type,

  /// The location of the original full-size attachment.
  String? url,

  /// The location of a scaled-down preview of the attachment.
  required String previewUrl,

  /// The location of the full-size original attachment on the remote website.
  String? remoteUrl,

  /// Metadata returned by Paperclip.
  required MediaMeta meta,

  /// Alternate text that describes what is in the media attachment, to be
  /// used for the visually impaired or when media attachments do not load.
  String? description,

  /// A hash computed by the BlurHash algorithm, for generating colorful
  /// preview thumbnails when media has not been downloaded yet.
  @JsonKey(name: 'blurhash') String? blurHash,
}) = _MediaAttachment;