leaveChatRoom method
- String roomId
~english Leaves the chat room.
Param roomId
The ID of the chat room to leave.
Throws A description of the exception. See ChatError. ~end
~chinese 离开聊天室。
Param roomId
聊天室 ID。
Throws 如果有异常会在这里抛出,包含错误码和错误描述,详见 ChatError。 ~end
Implementation
Future<void> leaveChatRoom(String roomId) async {
Map result = await _channel
.invokeMethod(ChatMethodKeys.leaveChatRoom, {"roomId": roomId});
try {
ChatError.hasErrorFromResult(result);
} on ChatError catch (e) {
throw e;
}
}