SponsoredMessage class final

Describes a sponsored message

Inheritance

Constructors

SponsoredMessage({required int messageId, required bool isRecommended, required MessageContent content, required MessageSponsor sponsor, required String buttonText, required String additionalInfo})
Describes a sponsored message
const
SponsoredMessage.fromJson(Map<String, dynamic> json)
Parses a SponsoredMessage from TDLib JSON.
factory

Properties

additionalInfo → String
If non-empty, additional information about the sponsored message to be shown along with the message
final
buttonText → String
If non-empty, text for the message action button
final
clientId → int?
Identifier of the TDLib client that sent this object, when known.
no setterinherited
content → MessageContent
Content of the message. Currently, can be only of the type messageText
final
extra → dynamic
"@extra" of the request this object answers; null for updates.
no setterinherited
hashCode → int
The hash code for this object.
no setterinherited
isRecommended → bool
True, if the message needs to be labeled as "recommended" instead of "sponsored"
final
messageId → int
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
Information about the sponsor of the message
final

Methods

copyWith({int? messageId, bool? isRecommended, MessageContent? content, MessageSponsor? sponsor, String? buttonText, String? additionalInfo}) → SponsoredMessage
Returns a copy with the given fields replaced. For a nullable field pass a function, e.g. field: () => null to clear it.
getConstructor() → String
TDLib type name, e.g. updateNewMessage.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
Converts this object to TDLib JSON.
override
toString() → String
A string representation of this object.
inherited

Operators

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

Constants

CONSTRUCTOR → const String
TDLib type name.