getTextMessageDraft static method
根据消息类型,targetId 获取某一会话的文字消息草稿。用于获取用户输入但未发送的暂存消息。
Implementation
static Future<String?> getTextMessageDraft(int? conversationType, String? targetId) async {
if (conversationType == null || targetId == null) {
developer.log("saveTextMessageDraft fail: conversationType or targetId or content is null", name: "RongIMClient");
return null;
}
Map paramMap = {
"conversationType": conversationType,
"targetId": targetId,
};
String? result = await _channel.invokeMethod(RCMethodKey.GetTextMessageDraft, paramMap);
return result;
}