leaveRoom method
@detail api
@brief Leave RTC room.
The user calls this method to leave the room, ending real-time message communication and releasing all communication-related resources.
@return
+ 0: Success
+ < 0: Failure
@note
+ When a visible user leaves the room, others in the room will receive rtsRoom:onUserLeave:reason:{@link #ByteRTCRTSRoomDelegate#rtsRoom:onUserLeave:reason}.
+ This method is an asynchronous operation, and the call returns without actually exiting the room. After you actually exit the room, you will receive a callback notification from rtsRoom:OnLeaveRoom:{@link #ByteRTCRTSRoomDelegate#rtsRoom:OnLeaveRoom} locally.
+ If the engine is destroyed immediately after this method is called, the SDK will not be able to trigger the rtsRoom:OnLeaveRoom:{@link #ByteRTCRTSRoomDelegate#rtsRoom:OnLeaveRoom} callback.
Implementation
FutureOr<int> leaveRoom() async {
return await nativeCall('leaveRoom', []);
}