addReaction method Null safety
Adds a reaction.
Param messageId
The message ID.
Param reaction
The reaction content.
Throws A description of the exception. See {@link EMError}.
Implementation
Future<void> addReaction({
required String messageId,
required String reaction,
}) async {
Map req = {"reaction": reaction, "msgId": messageId};
Map result = await EMMethodChannel.ChatManager.invokeMethod(
ChatMethodKeys.addReaction, req);
try {
EMError.hasErrorFromResult(result);
} on EMError catch (e) {
throw e;
}
}