MessageReactionUpdated class abstract

Represents a change of a reaction on a message performed by a user.

Implemented types
Available extensions
Annotations
  • @freezed

Constructors

MessageReactionUpdated({@JsonKey.new(name: 'chat') required Chat chat, @JsonKey.new(name: 'message_id') required int messageId, @JsonKey.new(name: 'user') User? user, @JsonKey.new(name: 'actor_chat') Chat? actorChat, @JsonKey.new(name: 'date') required int date, @JsonKey.new(name: 'old_reaction') required List<ReactionType> oldReaction, @JsonKey.new(name: 'new_reaction') required List<ReactionType> newReaction})
Creates a new instance of MessageReactionUpdated.
const
factory
MessageReactionUpdated.fromJson(Map<String, dynamic> json)
Creates a MessageReactionUpdated object from JSON object.
factory

Properties

actorChat → Chat?
The chat on behalf of which the reaction was changed, if the user is anonymous.
no setterinherited
chat → Chat
The chat containing the message the user reacted to.
no setterinherited
copyWith → $MessageReactionUpdatedCopyWith<MessageReactionUpdated>
Create a copy of MessageReactionUpdated with the given fields replaced by the non-null parameter values.
no setterinherited
date → int
Date of the change in Unix time.
no setterinherited
hashCode → int
The hash code for this object.
no setterinherited
messageId → int
Unique identifier of the message inside the chat.
no setterinherited
newReaction → List<ReactionType>
New list of reaction types that have been set by the user.
no setterinherited
oldReaction → List<ReactionType>
Previous list of reaction types that were set by the user.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
user → User?
The user that changed the reaction, if the user isn't anonymous.
no setterinherited

Methods

map<TResult extends Object?>(TResult $default(_MessageReactionUpdated value)) → TResult

Available on MessageReactionUpdated, provided by the MessageReactionUpdatedPatterns extension

A switch-like method, using callbacks.
mapOrNull<TResult extends Object?>(TResult? $default(_MessageReactionUpdated value)?) → TResult?

Available on MessageReactionUpdated, provided by the MessageReactionUpdatedPatterns extension

A variant of map that fallback to returning null.
maybeMap<TResult extends Object?>(TResult $default(_MessageReactionUpdated value)?, {required TResult orElse()}) → TResult

Available on MessageReactionUpdated, provided by the MessageReactionUpdatedPatterns extension

A variant of map that fallback to returning orElse.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
Serializes this MessageReactionUpdated to a JSON map.
inherited
toString() → String
A string representation of this object.
inherited

Operators

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