Attachment class

Constructors

Attachment({String? authorIcon, String? authorLink, String? authorName, String? color, String? fallback, List<Field>? fields, String? footer, String? footerIcon, String? imageUrl, String? pretext, String? text, String? thumbUrl, String? title, String? titleLink, int? ts})

Properties

authorIcon String?
A valid URL that displays a small 16px by 16px image to the left of the authorName text. Will only work if authorName is present.
final
A valid URL that will hyperlink the authorName text. Will only work if authorName is present.
final
authorName String?
Small text used to display the author's name.
final
color String?
Changes the color of the border on the left side of this attachment from the default gray. Can either be one of good (green), warning (yellow), danger (red), or any hex color code (eg. #439FE0).
final
fallback String?
A plain text summary of the attachment used in clients that don't show formatted text (eg. IRC, mobile notifications).
final
fields List<Field>?
An array of field objects that get displayed in a table-like way. For best results, include no more than 2-3 field objects.
final
Some brief text to help contextualize and identify an attachment. Limited to 300 characters, and may be truncated further when displayed to users in environments with limited screen real estate.
final
footerIcon String?
A valid URL to an image file that will be displayed beside the footer text. Will only work if authorName is present. We'll render what you provide at 16px by 16px. It's best to use an image that is similarly sized.
final
hashCode int
The hash code for this object.
no setterinherited
imageUrl String?
A valid URL to an image file that will be displayed at the bottom of the attachment. We support GIF, JPEG, PNG, and BMP formats.
final
pretext String?
Text that appears above the message attachment block.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
text String?
The main body text of the attachment. The content will automatically collapse if it contains 700+ characters or 5+ linebreaks, and will display a "Show more..." link to expand the content.
final
thumbUrl String?
A valid URL to an image file that will be displayed as a thumbnail on the right side of a message attachment. We currently support the following formats: GIF, JPEG, PNG, and BMP.
final
title String?
Large title text near the top of the attachment.
final
A valid URL that turns the title text into a hyperlink.
final
ts int?
An integer Unix timestamp that is used to related your attachment to a specific time. The attachment will display the additional timestamp value as part of the attachment's footer.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
toString() String
A string representation of this object.
inherited

Operators

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