dispose method
void
dispose()
Remove all SDK listeners and reset state, then log the Calls SDK out.
Takes this device's calls down locally first: the outgoing call
screens, the incoming call banner and the call screen are closed, the
media session is left and the call records are cleared. Nothing is sent
to the server; CometChatUIKit.logout does that, while the user is
still logged in, before it logs out.
Also clears the calling configuration passed to init, the service locators and CallStateService. Anything init still has in flight lands without effect, so a slow start can no longer register listeners for a user who has logged out. Safe to call more than once.
Implementation
void dispose() {
unawaited(CallsLifecycle.shutdown());
ccLog('CallEventService disposed');
}