BodyPart class Null safety

A BODY or BODYSTRUCTURE information element




allLeafParts List<BodyPart>
Retrieves all leaf parts, ie all parts that have no children parts themselves. [...]
bodyRaw String?
The raw text of this body part. This is set when fetching the message contents e.g. with BODY[].
read / write
cid String?
A string giving the content id as defined in MIME-IMB.
read / write
contentDisposition ContentDispositionHeader?
The content disposition information. This is constructed when querying BODYSTRUCTURE in a fetch.
read / write
contentType ContentTypeHeader?
The content type infomation.
read / write
description String?
A string giving the content description as defined in MIME-IMB.
read / write
encoding String?
A string giving the content transfer encoding as defined in MIME-IMB. Examples: base64, quoted-printable
read / write
envelope Envelope?
The envelope, only provided for message/rfc822 structures
read / write
fetchId String?
hashCode int
The hash code for this object. [...]
read-only, inherited
length int
Retrieves the number of nested parts
numberOfLines int?
Some message types like MESSAGE/RFC822 or TEXT also provide the number of lines
read / write
parts List<BodyPart>?
Children parts, if present
read / write
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
size int?
A number giving the size of the body in octets. Note that this size is the size in its transfer encoding and not the resulting size after any decoding.
read / write


addPart([BodyPart? childPart]) BodyPart
collectContentInfo(ContentDisposition disposition, List<ContentInfo> result, {bool? reverse, bool? withCleanParts, bool? complete}) → void
Adds the matching disposition header with the specified disposition of this part and this children parts to the result. Optionally set reverse to true to add all parts that do not match the specified disposition. All fetchId parsed from the BODYSTRUCTURE are returned in a form compatible with the body parts tree unless withCleanParts is false. Set complete to false to skip the included rfc822 messages parts.
findFirst(MediaSubtype subtype) BodyPart?
findFirstWithContentId(String partCid) BodyPart?
getChildPart(String partFetchId) BodyPart?
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
toString() String
A string representation of this object. [...]
write(StringBuffer buffer, [String padding = '']) → void


operator ==(Object other) bool
The equality operator. [...]
operator [](int index) BodyPart
Eases access to a nested part, same as accessing parts[index]