UploadedAttachment class

Represents a successfully uploaded attachment.

Contains the attachment ID, type, remote file URLs from the CDN upload, and any custom data associated with the attachment. Preserves the attachment type for proper rendering and handling of the uploaded content.

Example usage:

final uploadedAttachment = UploadedAttachment(
  id: 'attachment-123',
  type: AttachmentType.image,
  remoteUrl: 'https://cdn.example.com/file.jpg',
  thumbnailUrl: 'https://cdn.example.com/thumb.jpg',
  custom: {'source': 'camera', 'processed': true},
);

Constructors

UploadedAttachment({required String id, required AttachmentType type, String? remoteUrl, String? thumbnailUrl, Map<String, Object?>? custom})
Creates an UploadedAttachment with attachment details and remote URLs.
const

Properties

custom → Map<String, Object?>?
Optional custom data for storing arbitrary key-value pairs.
final
hashCode → int
The hash code for this object.
no setterinherited
hasThumbnail → bool
Whether this attachment has a thumbnail.
no setter
id → String
The ID of the attachment that was uploaded.
final
props → List<Object?>
The list of properties that will be used to determine whether two instances are equal.
no setter
remoteUrl → String?
The remote URL of the uploaded file.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
stringify → bool?
If set to true, the toString method will be overridden to output this instance's props.
no setterinherited
thumbnailUrl → String?
The remote URL of the file thumbnail, if available.
final
type → AttachmentType
The type of the attachment.
final

Methods

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

Operators

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