MessageEntity class

This object represents one special entity in a text message. For example, hashtags, usernames, URLs, etc.

https://core.telegram.org/bots/api#messageentity

Annotations
  • @JsonSerializable.new(includeIfNull: false)

Constructors

MessageEntity({String? type, int? offset, int? length, String? url, User? user, String? language, String? customEmojiID})
MessageEntity.fromJson(Map<String, dynamic> json)
factory

Properties

customEmojiID ↔ String?
Optional. For “custom_emoji” only, unique identifier of the custom emoji.
getter/setter pair
hashCode → int
The hash code for this object.
no setterinherited
language ↔ String?
Optional. For “pre” only, the programming language of the entity text.
getter/setter pair
length ↔ int?
Length of the entity in UTF-16 code units.
getter/setter pair
offset ↔ int?
Offset in UTF-16 code units to the start of the entity.
getter/setter pair
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
type ↔ String?
Type of the entity. Can be “mention” (@username), “hashtag” (#hashtag), “cashtag” ($USD), “bot_command” (/start@jobs_bot), “url” (https://telegram.org), “email” (do-not-reply@telegram.org), “phone_number” (+1-212-555-0123), “bold” (bold text), “italic” (italic text), “underline” (underlined text), “strikethrough” (strikethrough text), “spoiler” (spoiler message), “blockquote” (collapsed or standard quote), “expandable_blockquote” (expandable quote), “custom_emoji” (for inline custom emoji stickers), “code” (monowidth string), “pre” (monowidth block), “text_link” (for clickable text URLs), “text_mention” (for users without usernames)
getter/setter pair
url ↔ String?
Optional. For “text_link” only, url that will be opened after user taps on the text.
getter/setter pair
user ↔ User?
Optional. For “text_mention” only, the mentioned user.
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