Annotation class
Annotations associated with the plain-text body of the message.
To add basic formatting to a text message, see
Format text messages.
Example plain-text message body: Hello @FooBot how are you!"
The
corresponding annotations metadata: ``` "annotations":{
"type":"USER_MENTION", "startIndex":6, "length":7, "userMention": { "user":
{ "name":"users/{user}", "displayName":"FooBot",
"avatarUrl":"https://goo.gl/aeDtrS", "type":"BOT" }, "type":"MENTION" } }
Output only.
Constructors
- Annotation({int? length, SlashCommandMetadata? slashCommand, int? startIndex, String? type, UserMentionMetadata? userMention})
- Annotation.fromJson(Map json_)
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- length ↔ int?
-
Length of the substring in the plain-text message body this annotation
corresponds to.
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- slashCommand ↔ SlashCommandMetadata?
-
The metadata for a slash command.
getter/setter pair
- startIndex ↔ int?
-
Start index (0-based, inclusive) in the plain-text message body this
annotation corresponds to.
getter/setter pair
- type ↔ String?
-
The type of this annotation.
Possible string values are:
getter/setter pair
- userMention ↔ UserMentionMetadata?
-
The metadata of user mention.
getter/setter pair
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