MessageRoutingAttachment class final

A MIME part of a routed message: an attachment or an inline part.

Constructors

MessageRoutingAttachment({required String filename, required String contentType, required String contentId, required String disposition, required String data, JsonMap raw = const {}})
Creates a routed attachment.
const
MessageRoutingAttachment.fromJson(JsonMap json)
Decodes a routed attachment from JSON.
factory

Properties

contentId → String
The Content-ID without angle brackets, percent-decoded. Empty when the part has none.
final
contentType → String
The MIME type.
final
data → String
The base64-encoded content. Use decodeData for the bytes.
final
disposition → String
The Content-Disposition type, usually attachment or inline, and empty when the part has no such header. Other values occur; treat unrecognised ones as attachment.
final
filename → String
The file name.
final
hashCode → int
The hash code for this object.
no setterinherited
raw → JsonMap
The JSON object this value was decoded from.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

decodeData() → Uint8List
Decodes data into bytes. Throws a FormatException when data is not valid base64.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → JsonMap
Encodes this object as JSON.
toString() → String
A string representation of this object.
override

Operators

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