SponsoredMessage class

Inheritance

Constructors

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

Properties

additionalInfo → String
additionalInfo If non-empty, additional information about the sponsored message to be shown along with the message
final
clientId → int?
client identifier
no setterinherited
content → MessageContent
content Content of the message. Currently, can be only of the type messageText
final
extra → dynamic
callback sign
no setterinherited
hashCode → int
The hash code for this object.
no setterinherited
isRecommended → bool
isRecommended True, if the message needs to be labeled as "recommended" instead of "sponsored"
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
sponsor Information about the sponsor of the message
final

Methods

copyWith({int? messageId, bool? isRecommended, MessageContent? content, MessageSponsor? sponsor, String? additionalInfo}) → 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