unsubscribe method
- String topic
Unsubscribe from a topic
Implementation
Future<void> unsubscribe(String topic) async {
try {
if (!_container.isRegistered(PubSubHandler)) return;
await _container.get<PubSubHandler>().unsubscribe(topic);
} catch (e) {
_logger.error('Failed to unsubscribe: $e');
}
}