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
- Create an object of the
MarkReadChatroomRequestclass. - Call the
markReadChatroom()function using the instance of theLMChatClientclass. - 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
| Variable | Type | Description | Optional |
|---|---|---|---|
chatroomId | int | Chatroom Id |