reactionList method

Future<List<EMMessageReaction>> reactionList()

获取 Reaction 列表。

Return Reaction 列表。

Throws 如果有方法调用的异常会在这里抛出,可以看到具体错误原因。请参见 EMError

Implementation

Future<List<EMMessageReaction>> reactionList() async {
  Map req = {"msgId": msgId};
  Map result = await _emMessageChannel.invokeMethod(
    ChatMethodKeys.getReactionList,
    req,
  );
  try {
    EMError.hasErrorFromResult(result);
    List<EMMessageReaction> list = [];
    result[ChatMethodKeys.getReactionList]?.forEach(
      (element) => list.add(
        EMMessageReaction.fromJson(element),
      ),
    );
    return list;
  } on EMError catch (e) {
    throw e;
  }
}