SponsoredMessage class

Inheritance

Constructors

SponsoredMessage({required int messageId, required int sponsorChatId, ChatInviteLinkInfo? sponsorChatInfo, InternalLinkType? link, required MessageContent content, dynamic extra, int? clientId})
Describes a sponsored message
const
SponsoredMessage.fromJson(Map<String, dynamic> json)
Parse from a json
factory

Properties

clientId int?
clientId client identifier
final
content MessageContent
content Content of the message. Currently, can be only of the type messageText
final
extra → dynamic
extra callback sign
final
hashCode int
The hash code for this object.
no setterinherited
link An internal link to be opened when the sponsored message is clicked; may be null. If null, the sponsor chat needs to be opened instead
final
messageId int
messageId Message identifier; unique for the chat to which the sponsored message belongs among both ordinary and sponsored messages
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sponsorChatId int
sponsorChatId Sponsor chat identifier; 0 if the sponsor chat is accessible through an invite link
final
sponsorChatInfo ChatInviteLinkInfo?
sponsorChatInfo Information about the sponsor chat; may be null unless sponsor_chat_id == 0
final

Methods

copyWith({int? messageId, int? sponsorChatId, ChatInviteLinkInfo? sponsorChatInfo, InternalLinkType? link, MessageContent? content, dynamic extra, int? clientId}) SponsoredMessage
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