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 canGetStatistics, required bool canGetMessageThread, required bool canGetViewers, required bool canGetMediaTimestampLinks, required bool hasTimestampedMedia, required bool isChannelPost, required bool containsUnreadMention, required int date, required int editDate, MessageForwardInfo? forwardInfo, MessageInteractionInfo? interactionInfo, required int replyInChatId, required int replyToMessageId, required int messageThreadId, required int ttl, required double ttlExpiresIn, 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
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
canGetMediaTimestampLinks True, if media timestamp links can be generated for media timestamp entities in the message text, caption or web page description
final
canGetMessageThread bool
canGetMessageThread True, if the message thread info is available
final
canGetStatistics bool
canGetStatistics True, if the message statistics are available
final
canGetViewers bool
canGetViewers True, if chat members already viewed the message can be received through getMessageViewers
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
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
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
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
replyInChatId int
replyInChatId If non-zero, the identifier of the chat to which the replied message belongs; Currently, only messages in the Replies chat can have different reply_in_chat_id and chat_id
final
replyMarkup ReplyMarkup?
replyMarkup Reply markup for the message; may be null
final
replyToMessageId int
replyToMessageId If non-zero, the identifier of the message this message is replying to; can be the identifier of a deleted message
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
final
senderId MessageSender
senderId Identifier of the sender of the message
final
sendingState MessageSendingState?
sendingState The sending state of the message; may be null
final
ttl int
ttl For self-destructing messages, the message's TTL (Time To Live), in seconds; 0 if none. TDLib will send updateDeleteMessages or updateMessageContent once the TTL expires
final
ttlExpiresIn double
ttlExpiresIn Time left before the message expires, in seconds. If the TTL timer isn't started yet, equals to the value of the ttl field
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? canGetStatistics, bool? canGetMessageThread, bool? canGetViewers, bool? canGetMediaTimestampLinks, bool? hasTimestampedMedia, bool? isChannelPost, bool? containsUnreadMention, int? date, int? editDate, MessageForwardInfo? forwardInfo, MessageInteractionInfo? interactionInfo, int? replyInChatId, int? replyToMessageId, int? messageThreadId, int? ttl, double? ttlExpiresIn, 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