markRead method

Future<EmptyResponse> markRead(
  1. {String? messageId}
)

Mark all messages as read.

Optionally provide a messageId if you want to mark a particular message as read.

Implementation

Future<EmptyResponse> markRead({String? messageId}) async {
  _checkInitialized();
  client.state.totalUnreadCount =
      max(0, (client.state.totalUnreadCount) - (state!.unreadCount));
  state!.unreadCount = 0;
  return _client.markChannelRead(id!, type, messageId: messageId);
}