updateTopicSubscription method
Subscribes or unsubscribes from topic based on the enabled parameter.
Implementation
Future<void> updateTopicSubscription(
String topic, {
bool enabled = true,
}) async {
if (kIsWeb) return;
enabled
? instance.subscribeToTopic(topic)
: instance.unsubscribeFromTopic(topic);
}