getMessage static method

Future<Message?> getMessage(
  1. int messageId
)

获取本地单条消息

messageId 消息 id

Implementation

static Future<Message?> getMessage(int messageId) async {
  Map map = {"messageId": messageId};
  String? msgStr = await _channel.invokeMethod(RCMethodKey.GetMessage, map);
  if (msgStr == null) {
    return null;
  }
  Message? msg = MessageFactory.instance!.string2Message(msgStr);
  return msg;
}