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 ChatError}.

Implementation

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