markAllConversationsAsRead method Null safety

Future<void> markAllConversationsAsRead()

Marks all messages as read.

This method is for the local conversations only.

Throws A description of the exception. See {@link EMError}.

Implementation

Future<void> markAllConversationsAsRead() async {
  Map result = await EMMethodChannel.ChatManager.invokeMethod(
      ChatMethodKeys.markAllChatMsgAsRead);
  try {
    EMError.hasErrorFromResult(result);
  } on EMError catch (e) {
    throw e;
  }
}