dispose method
Disposes the client. A disposed client cannot have other functions called unless it is re-initialized via the initialize function.
Implementation
Future<void> dispose() async {
if (_initialized) {
_logger.info('[dispose]: start');
_client.close();
_subscriptions.forEach((sub) => sub.cancel());
_subscriptions.clear();
_initialized = false;
_logger.info('[dispose]: complete');
}
}