Skip to main content

Mark Read Chatroom

Marking a chatroom as read with LikeMinds Flutter Chat SDK allows you to control your notification preferences for that specific chatroom.

Steps to Mark a Chatroom as Read

  1. Create an object of the MarkReadChatroomRequest class.
  2. Call the markReadChatroom() function using the instance of the LMChatClient class.
  3. Process the response LMResponse<void> as per your requirement.
MarkReadChatroomRequest request = (MarkReadChatroomRequestBuilder()
..chatroomId("ENTER_CHATROOM_ID"))
.build();

LMResponse<void> response =
await lmChatClient.markReadChatroom(request);

if (response.success) {
// your function to process the response data
processResponse(response);
} else {
// your function to process error message
processError(response);
}

Models

MarkReadChatroomRequest

List of parameters for the MarkReadChatroomRequest class

VariableTypeDescriptionOptional
chatroomIdintChatroom Id