subscribe method

void subscribe(
  1. String topic
)

Implementation

void subscribe(String topic) {
  debugPrint('Subscribing to the hello topic');
  mqttClient?.subscribe(topic, MqttQos.exactlyOnce);
}