Reaction class

The class that defines a reaction

Annotations

Constructors

Reaction({String messageId, DateTime createdAt, String type, User user, String userId, int score, Map<String, dynamic> extraData})
Constructor used for json serialization
Reaction.fromJson(Map<String, dynamic> json)
Create a new instance from a json
factory

Properties

createdAt DateTime
The date of the reaction
@JsonKey(includeIfNull: false, toJson: Serialization.readOnly), final
extraData Map<String, dynamic>
The score of the reaction (ie. number of reactions sent)
@JsonKey(includeIfNull: false), final
hashCode int
The hash code for this object. [...]
read-only, inherited
messageId String
The messageId to which the reaction belongs
final
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
score int
The score of the reaction (ie. number of reactions sent)
final
type String
The type of the reaction
final
user User
The user that sent the reaction
@JsonKey(includeIfNull: false, toJson: Serialization.readOnly), final
userId String
The userId that sent the reaction
@JsonKey(includeIfNull: false, toJson: Serialization.readOnly), final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toJson() Map<String, dynamic>
Serialize to json
toString() String
Returns a string representation of this object.
inherited

Operators

operator ==(dynamic other) bool
The equality operator. [...]
inherited

Constants

topLevelFields → const List<String>
Map of custom user extraData
const ['message_id', 'created_at', 'type', 'user', 'user_id', 'score']