leaveRoom method
leave room
Implementation
Future<ZegoRoomLogoutResult> leaveRoom() async {
final leaveRoomResult = await ZegoUIKitCore.shared.leaveRoom();
if (ZegoErrorCode.CommonSuccess != leaveRoomResult.errorCode) {
ZegoUIKitCore.shared.error.errorStreamCtrl?.add(ZegoUIKitError(
code: ZegoUIKitErrorCode.roomLeaveError,
message: 'leave room error:${leaveRoomResult.errorCode}, '
'${ZegoUIKitErrorCode.expressErrorCodeDocumentTips}',
method: 'leaveRoom',
));
}
return leaveRoomResult;
}