deleteAllMessages method

Future<void> deleteAllMessages()

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

Throws A description of the exception. See ChatError.

Implementation

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