recallMessage method
撤回发送成功的消息。
Param messageId 消息 ID。
Throws 如果有异常会在这里抛出,包含错误码和错误描述,详见 ChatError。
Implementation
Future<void> recallMessage(String messageId, {String? ext}) async {
try {
Map req = {"msgId": messageId};
req.putIfNotNull('ext', ext);
Map result = await platform_interface.Client.instance.chatManager
.callNativeMethod(ChatMethodKeys.recallMessage, req);
ChatError.hasErrorFromResult(result);
} catch (e) {
rethrow;
}
}