recallMessage method

Future<void> recallMessage(
  1. String messageId, {
  2. String? ext,
})

Recalls the sent message.

Param messageId The message ID.

Throws A description of the exception. See 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;
  }
}