MessageEntity class
This object represents one special entity in a text message. For example, hashtags, usernames, URLs, etc.
Constructors
- MessageEntity({required MessageEntityType type, required int offset, required int length, String? url, User? user, String? language, String? customEmojiId})
-
Constructs a MessageEntity object
const
-
MessageEntity.fromJson(Map<
String, dynamic> json) -
Converts a MessageEntity object to a JSON object
factory
Properties
- customEmojiId → String?
-
Optional. For “custom_emoji” only, unique identifier of the custom emoji. Use getCustomEmojiStickers to get full information about the sticker
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- language → String?
-
Optional. For “pre” only, the programming language of the entity text
final
- length → int
-
Length of the entity in UTF-16 code units
final
- offset → int
-
Offset in UTF-16 code units to the start of the entity
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- type → MessageEntityType
-
Type of the entity. Currently, can be:
final
- url → String?
-
Optional. For “text_link” only, URL that will be opened after user taps on the text
final
- user → User?
-
Optional. For “text_mention” only, the mentioned user
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> - Converts a MessageEntity object to a JSON object
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited