deleteAllMessages method

Future<void> deleteAllMessages()

~english Deletes all the messages of the conversation from both the memory and local database.

Throws A description of the exception. See EMError. ~end

~chinese 同时从内存和本地数据库中删除会话中的所有消息。

Throws 如果有异常会在这里抛出,包含错误码和错误描述,详见 EMError。 ~end

Implementation

Future<void> deleteAllMessages() async {
  Map result = await _emConversationChannel.invokeMethod(
      ChatMethodKeys.clearAllMessages, this._toJson());
  try {
    EMError.hasErrorFromResult(result);
  } on EMError catch (e) {
    throw e;
  }
}