Attachment class

The class that contains the information about an attachment

Annotations

Constructors

Attachment({String type, String titleLink, String title, String thumbUrl, String text, String pretext, String ogScrapeUrl, String imageUrl, String footerIcon, String footer, dynamic fields, String fallback, String color, String authorName, String authorLink, String authorIcon, String assetUrl, List<Action> actions, Map<String, dynamic> extraData, Uri localUri})
Constructor used for json serialization
Attachment.fromJson(Map<String, dynamic> json)
Create a new instance from a json
factory

Properties

actions List<Action>
Actions from a command
final
assetUrl String
The URL to the audio, video or image related to the URL.
final
authorIcon String
final
final
authorName String
The name of the author.
final
color String
final
extraData Map<String, dynamic>
Map of custom channel extraData
@JsonKey(includeIfNull: false), final
fallback String
final
fields → dynamic
final
final
footerIcon String
final
hashCode int
The hash code for this object. [...]
read-only, override
imageUrl String
The URL to the attached image. This is present for URL pointing to an image article (eg. Unsplash)
final
localUri Uri
final
ogScrapeUrl String
The original URL that was used to scrape this attachment.
final
pretext String
Optional text that appears above the attachment block
final
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
text String
The attachment text. It will be displayed in the channel next to the original message.
final
thumbUrl String
The URL to the attached file thumbnail. You can use this to represent the attached link.
final
title String
The attachment title
final
The link to which the attachment message points to.
final
type String
The attachment type based on the URL resource. This can be: audio, image or video
final

Methods

copyWith({String type, String titleLink, String title, String thumbUrl, String text, String pretext, String ogScrapeUrl, String imageUrl, String footerIcon, String footer, dynamic fields, String fallback, String color, String authorName, String authorLink, String authorIcon, String assetUrl, List<Action> actions, Uri localUri, Map<String, dynamic> extraData}) Attachment
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toJson() Map<String, dynamic>
Serialize to json
toString() String
Returns a string representation of this object.
inherited

Operators

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

Constants

topLevelFields → const List<String>
Known top level fields. Useful for Serialization methods.
const ['type', 'title_link', 'title', 'thumb_url', 'text', 'pretext', 'og_scrape_url', 'image_url', 'footer_icon', 'footer&#…