dispose method
Call this function to dispose the client
Implementation
Future<void> dispose() async {
logger.info('Disposing new StreamChatClient');
// disposing state
state.dispose();
// disconnecting persistence client
await _chatPersistenceClient?.disconnect();
// closing web-socket connection
closeConnection();
await _eventController.close();
await _wsConnectionStatusController.close();
}