PartBuilder class Null safety

Allows to configure a mime part

Implementers

Constructors

PartBuilder(MimePart mimePart, {String? text, TransferEncoding transferEncoding = TransferEncoding.automatic, CharacterSet? characterSet, ContentTypeHeader? contentType})

Properties

attachments List<AttachmentInfo>
final
characterSet CharacterSet?
read / write
contentDisposition ContentDispositionHeader?
read / write
contentType ContentTypeHeader?
read / write
hasAttachments bool
read-only
hashCode int
The hash code for this object. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
text String?
read / write
transferEncoding TransferEncoding
read / write

Methods

addBinary(Uint8List data, MediaType mediaType, {TransferEncoding transferEncoding = TransferEncoding.base64, ContentDispositionHeader? disposition, String? filename}) PartBuilder
Adds a binary data part with the given data and optional filename. [...]
addFile(File file, MediaType mediaType, {ContentDispositionHeader? disposition}) Future<PartBuilder>
Adds the file part asyncronously. [...]
addHeader(String name, String value, {HeaderEncoding encoding = HeaderEncoding.none}) → void
Adds a header with the specified name and value. [...]
addMailAddressHeader(String name, List<MailAddress> addresses) → void
Adds another header with the specified name with the given mail addresses as its value
addMessagePart(MimeMessage mimeMessage, {ContentDisposition disposition = ContentDisposition.attachment}) PartBuilder
Adds the message mimeData as a message/rfc822 content with the given subject as its filename. [...]
addMultipartAlternative() PartBuilder
Adds a part with the multipart/alternative subtype. [...]
addPart({ContentDispositionHeader? disposition, MimePart? mimePart, MediaSubtype? mediaSubtype, bool insert = false}) PartBuilder
Adds a new part [...]
addText(String text, {MediaType? mediaType, TransferEncoding transferEncoding = TransferEncoding.automatic, CharacterSet characterSet = CharacterSet.utf8, ContentDispositionHeader? disposition, bool insert = false}) PartBuilder
Adds a text part to this message with the specified text. [...]
addTextHtml(String text, {TransferEncoding transferEncoding = TransferEncoding.automatic, CharacterSet characterSet = CharacterSet.utf8, ContentDispositionHeader? disposition, bool insert = false}) PartBuilder
Adds a HTML text part [...]
addTextPlain(String text, {TransferEncoding transferEncoding = TransferEncoding.automatic, CharacterSet characterSet = CharacterSet.utf8, ContentDispositionHeader? disposition, bool insert = false}) PartBuilder
Adds a plain text part [...]
getPart(MediaSubtype mediaSubtype, {bool recursive = true}) PartBuilder?
Retrieves the first builder with the specified mediaSubtype. [...]
getTextHtmlPart() PartBuilder?
Retrieves the first builder with a text/plain part. [...]
getTextPlainPart() PartBuilder?
Retrieves the first builder with a text/plain part. [...]
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
removeAttachment(AttachmentInfo info) → void
Removes the specified attachment info
removeHeader(String name) → void
Removes the header with the specified name. [...]
removePart(PartBuilder childBuilder) → void
Removes the specified part childBuilder
setContentType(MediaType mediaType, {CharacterSet? characterSet, String? multiPartBoundary, String? name, Map<String, String>? parameters}) → void
Creates the content-type based on the specified mediaType. [...]
setHeader(String name, String? value, {HeaderEncoding encoding = HeaderEncoding.none}) → void
Sets a header with the specified name and value, replacing any previous header with the same name. [...]
setMailAddressHeader(String name, List<MailAddress> addresses) → void
Adds the header with the specified name with the given mail addresses as its value
toString() String
A string representation of this object. [...]
inherited

Operators

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