EMMessageReactionEvent.fromJson constructor
EMMessageReactionEvent.fromJson(- Map map
)
Implementation
factory EMMessageReactionEvent.fromJson(Map map) {
String conversationId = map["conversationId"];
String messageId = map["messageId"];
List<EMMessageReaction> reactions = [];
map["reactions"]?.forEach((element) {
reactions.add(EMMessageReaction.fromJson(element));
});
List<ReactionOperation> operations = [];
map["operations"]?.forEach((e) {
operations.add(ReactionOperation.fromJson(e));
});
return EMMessageReactionEvent._private(
conversationId: conversationId,
messageId: messageId,
reactions: reactions,
operations: operations,
);
}