leaveChatRoom method Null safety
- String roomId
Leaves the chat room.
Param roomId
The ID of the chat room to leave.
Throws A description of the exception. See {@link EMError}.
Implementation
Future<void> leaveChatRoom(String roomId) async {
Map result = await _channel
.invokeMethod(ChatMethodKeys.leaveChatRoom, {"roomId": roomId});
try {
EMError.hasErrorFromResult(result);
} on EMError catch (e) {
throw e;
}
}