MimePart class
A MIME part In a simple case a MIME message only has one MIME part.
- Implementers
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
-
headers
↔ List<
Header> ? -
The
headers
field contains all message(part) headersgetter/setter pair - mediaType → MediaType
-
Simplified way to retrieve the media type
When no
content-type
header is defined, the media typetext/plain
is returnedno setter - mimeData ↔ MimeData?
-
The raw message data of this part. May or may not include headers, depending on retrieval.
getter/setter pair
-
parts
↔ List<
MimePart> ? -
The children of this part, if any.
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
addHeader(
String name, String? value, [HeaderEncoding encoding = HeaderEncoding.none]) → void -
Adds a header with the specified
name
,value
and optionalencoding
. -
addPart(
MimePart part) → void -
collectContentInfo(
ContentDisposition disposition, List< ContentInfo> result, String? fetchId, {bool? reverse, bool? complete}) → void -
Adds the matching disposition header with the specified
disposition
of this part and this children parts to theresult
. -
decodeContentBinary(
) → Uint8List? - Decodes the binary data of this part.
-
decodeContentMessage(
) → MimeMessage? - Decodes a message/rfc822 part
-
decodeContentText(
) → String? - Decodes the text of this part.
-
decodeDate(
) → DateTime? - Decodes the message 'date' header to local time.
-
decodeFileName(
) → String? - Tries to find and decode the associated file name
-
decodeHeaderDateValue(
String name) → DateTime? - Decodes the a date value of the first matching header
-
decodeHeaderMailAddressValue(
String name) → List< MailAddress> ? - Decodes the email address value of first matching header
-
decodeHeaderValue(
String name) → String? - Decodes the value of the first matching header
-
decodeTextHtmlPart(
) → String? - Tries to find a 'content-type: text/html' part and decodes its contents when found.
-
decodeTextPlainPart(
) → String? - Tries to find a 'content-type: text/plain' part and decodes its contents when found.
-
getHeader(
String name) → Iterable< Header> ? -
Retrieves all matching headers with the specified
name
. -
getHeaderContentDisposition(
) → ContentDispositionHeader? - Retrieves the first 'content-disposition' header.
-
getHeaderContentType(
) → ContentTypeHeader? - Retrieves the first 'content-type' header.
-
getHeaderValue(
String name) → String? - Retrieves the raw value of the first matching header.
-
getPartWithMediaSubtype(
MediaSubtype subtype) → MimePart? -
Searches the MimePart with the specified
subtype
. -
hasHeader(
String name) → bool -
Checks if this MIME part has a header with the specified
name
. -
hasPart(
MediaSubtype subtype, {int? depth}) → bool - Checks if this MIME part or a child is of the specified media type
-
hasTextPart(
{int? depth}) → bool - Checks if this MIME part or a child is textual.
-
insertPart(
MimePart part) → void -
isTextMediaType(
) → bool - Checks if this MIME part is textual.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
parse(
) → void - Parses this and all children MIME parts.
-
removeHeader(
String name) → void -
Removes the header with the specified
name
. -
render(
StringBuffer buffer, {bool renderHeader = true}) → void -
Renders this mime part with all children parts into the specified
buffer
. -
setHeader(
String name, String? value, [HeaderEncoding encoding = HeaderEncoding.none]) → void -
Sets a header with the specified
name
,value
and optionalencoding
, replacing any existing header with the samename
. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited