AttachmentBuilder class

Helper for sending attachment in messages. Allows to create attachment from path, File or bytes.

Constructors

AttachmentBuilder.bytes(List<int> bytes, String name, {bool spoiler})
Creates attachment from provided bytes
factory
AttachmentBuilder.file(File file, {String name, bool spoiler})
Create attachment from specified file instance. Name will be automatically extracted from path if no name provided.
factory
AttachmentBuilder.path(String path, {String name, bool spoiler})
Open file at path then read it's contents and prepare to send. Name will be automatically extracted from path if no name provided.
factory

Properties

attachUrl String
Generate Attachment string
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

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
Returns a string representation of this object.
inherited

Operators

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