Attachment class

Represents a file or media attachment that can be added to a status. https://docs.joinmastodon.org/entities/attachment/

Annotations
  • @JsonSerializable()

Constructors

Attachment({required String id, required AttachmentType type, required Uri url, required Uri? remoteUrl, required Uri? previewUrl, required Uri? textUrl, required Meta? meta, required String? description, required String? blurhash})
Attachment.fromJson(Map<String, dynamic> json)
factory

Properties

blurhash String?
A hash computed by the BlurHash algorithm, for generating colorful preview thumbnails when media has not been downloaded yet
final
description String?
Alternate text that describes what is in the media attachment, to be used for the visually impaired or when media attachments do not load
final
hashCode int
The hash code for this object.
no setterinherited
id String
The ID of the attachment in the database
final
meta Meta?
Metadata returned by Paperclip May contain subtrees small and original, as well as various other top-level properties. More importantly, there may be another top-level focus Hash object as of Mastodon 2.3.0, with coordinates can be used for smart thumbnail cropping
final
previewUrl Uri?
The location of a scaled-down preview of the attachment
final
remoteUrl Uri?
The location of the full-size original attachment on the remote website
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
textUrl Uri?
A shorter URL for the attachment
final
type AttachmentType
The type of the attachment, enumerated in AttachmentType
final
url Uri
The location of the original full-size attachment
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited