Join Chatroom
Joining a chatroom with LikeMinds Flutter Chat SDK allows you to receive timely notifications for all conversations happening within that chatroom.Experience real-time engagement and never miss out on any important conversations by joining the chatroom using LikeMinds Flutter Chat SDK.
Steps to follow a chatroom
- Create an object of the
FollowChatroomRequest
class, passtrue
to value. - For following a chatroom call
followChatroom()
present inLMChatClient
class using your request object. - Process the response (
LMResponse<FollowChatroomResponse>
) as per your requirement.
// To leave a chatroom, set the value to false
FollowChatroomRequest request = (FollowChatroomRequestBuilder()
..chatroomId(70989)
..memberId(87103)
..value(true)).build();
LMResponse<FollowChatroomResponse> response =
await lmChatClient.followChatroom(request);
if (response.success) {
// your function to process the response data
processResponse(response);
} else {
// your function to process error message
processError(response);
}
Models
FollowChatroomRequest
List of parameters for the FollowChatroomRequest
class
Variable | Type | Description | Optional |
---|---|---|---|
chatroomId | int | Chatroom Id | |
memberId | int | Member Id | ✔️ |
value | bool | Follow value |
FollowChatroomResponse
List of parameters for the FollowChatroomResponse
class
Variable | Type | Description | Optional |
---|---|---|---|
success | bool | API success status | |
errorMessage | String? | Error message in case of failure | ✔️ |