Message class

Inheritance

Constructors

Message({required int id, required MessageSender senderId, required int chatId, MessageSendingState? sendingState, MessageSchedulingState? schedulingState, required bool isOutgoing, required bool isPinned, required bool canBeEdited, required bool canBeForwarded, required bool canBeSaved, required bool canBeDeletedOnlyForSelf, required bool canBeDeletedForAllUsers, required bool canGetAddedReactions, required bool canGetStatistics, required bool canGetMessageThread, required bool canGetViewers, required bool canGetMediaTimestampLinks, required bool canReportReactions, required bool hasTimestampedMedia, required bool isChannelPost, required bool isTopicMessage, required bool containsUnreadMention, required int date, required int editDate, MessageForwardInfo? forwardInfo, MessageInteractionInfo? interactionInfo, required List<UnreadReaction> unreadReactions, MessageReplyTo? replyTo, required int messageThreadId, required int selfDestructTime, required double selfDestructIn, required double autoDeleteIn, required int viaBotUserId, required String authorSignature, required int mediaAlbumId, required String restrictionReason, required MessageContent content, ReplyMarkup? replyMarkup, dynamic extra, int? clientId})
Describes a message
const
Message.fromJson(Map<String, dynamic> json)
Parse from a json
factory

Properties

authorSignature String
authorSignature For channel posts and anonymous group messages, optional author signature
final
autoDeleteIn double
autoDeleteIn Time left before the message will be automatically deleted by message_auto_delete_time setting of the chat, in seconds; 0 if never. TDLib will send updateDeleteMessages or updateMessageContent once the time expires
final
canBeDeletedForAllUsers bool
canBeDeletedForAllUsers True, if the message can be deleted for all users
final
canBeDeletedOnlyForSelf bool
canBeDeletedOnlyForSelf True, if the message can be deleted only for the current user while other users will continue to see it
final
canBeEdited bool
canBeEdited True, if the message can be edited. For live location and poll messages this fields shows whether editMessageLiveLocation or stopPoll can be used with this message by the application
final
canBeForwarded bool
canBeForwarded True, if the message can be forwarded
final
canBeSaved bool
canBeSaved True, if content of the message can be saved locally or copied
final
canGetAddedReactions bool
canGetAddedReactions True, if the list of added reactions is available through getMessageAddedReactions
final
canGetMediaTimestampLinks True, if media timestamp links can be generated for media timestamp entities in the message text, caption or web page description through getMessageLink
final
canGetMessageThread bool
canGetMessageThread True, if information about the message thread is available through getMessageThread and getMessageThreadHistory
final
canGetStatistics bool
canGetStatistics True, if the message statistics are available through getMessageStatistics
final
canGetViewers bool
canGetViewers True, if chat members already viewed the message can be received through getMessageViewers
final
canReportReactions bool
canReportReactions True, if reactions on the message can be reported through reportMessageReactions
final
chatId int
chatId Chat identifier
final
clientId int?
clientId client identifier
final
containsUnreadMention bool
containsUnreadMention True, if the message contains an unread mention for the current user
final
content MessageContent
content Content of the message
final
date int
date Point in time (Unix timestamp) when the message was sent
final
editDate int
editDate Point in time (Unix timestamp) when the message was last edited
final
extra → dynamic
extra callback sign
final
forwardInfo MessageForwardInfo?
forwardInfo Information about the initial message sender; may be null if none or unknown
final
hashCode int
The hash code for this object.
no setterinherited
hasTimestampedMedia bool
hasTimestampedMedia True, if media timestamp entities refers to a media in this message as opposed to a media in the replied message
final
id int
id Message identifier; unique for the chat to which the message belongs
final
interactionInfo MessageInteractionInfo?
interactionInfo Information about interactions with the message; may be null if none
final
isChannelPost bool
isChannelPost True, if the message is a channel post. All messages to channels are channel posts, all other messages are not channel posts
final
isOutgoing bool
isOutgoing True, if the message is outgoing
final
isPinned bool
isPinned True, if the message is pinned
final
isTopicMessage bool
isTopicMessage True, if the message is a forum topic message
final
mediaAlbumId int
mediaAlbumId Unique identifier of an album this message belongs to. Only audios, documents, photos and videos can be grouped together in albums
final
messageThreadId int
messageThreadId If non-zero, the identifier of the message thread the message belongs to; unique within the chat to which the message belongs
final
replyMarkup ReplyMarkup?
replyMarkup Reply markup for the message; may be null if none
final
replyTo MessageReplyTo?
replyTo Information about the message or the story this message is replying to; may be null if none
final
restrictionReason String
restrictionReason If non-empty, contains a human-readable description of the reason why access to this message must be restricted
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
schedulingState MessageSchedulingState?
schedulingState The scheduling state of the message; may be null if the message isn't scheduled
final
selfDestructIn double
selfDestructIn Time left before the message self-destruct timer expires, in seconds. If the self-destruct timer isn't started yet, equals to the value of the self_destruct_time field
final
selfDestructTime int
selfDestructTime The message's self-destruct time, in seconds; 0 if none. TDLib will send updateDeleteMessages or updateMessageContent once the time expires
final
senderId MessageSender
senderId Identifier of the sender of the message
final
sendingState MessageSendingState?
sendingState The sending state of the message; may be null if the message isn't being sent and didn't fail to be sent
final
unreadReactions List<UnreadReaction>
unreadReactions Information about unread reactions added to the message
final
viaBotUserId int
viaBotUserId If non-zero, the user identifier of the bot through which this message was sent
final

Methods

copyWith({int? id, MessageSender? senderId, int? chatId, MessageSendingState? sendingState, MessageSchedulingState? schedulingState, bool? isOutgoing, bool? isPinned, bool? canBeEdited, bool? canBeForwarded, bool? canBeSaved, bool? canBeDeletedOnlyForSelf, bool? canBeDeletedForAllUsers, bool? canGetAddedReactions, bool? canGetStatistics, bool? canGetMessageThread, bool? canGetViewers, bool? canGetMediaTimestampLinks, bool? canReportReactions, bool? hasTimestampedMedia, bool? isChannelPost, bool? isTopicMessage, bool? containsUnreadMention, int? date, int? editDate, MessageForwardInfo? forwardInfo, MessageInteractionInfo? interactionInfo, List<UnreadReaction>? unreadReactions, MessageReplyTo? replyTo, int? messageThreadId, int? selfDestructTime, double? selfDestructIn, double? autoDeleteIn, int? viaBotUserId, String? authorSignature, int? mediaAlbumId, String? restrictionReason, MessageContent? content, ReplyMarkup? replyMarkup, dynamic extra, int? clientId}) Message
getConstructor() String
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson([dynamic extra]) Map<String, dynamic>
override
toString() String
A string representation of this object.
inherited

Operators

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

Constants

CONSTRUCTOR → const String