subscribe method

void subscribe(
  1. String topic
)

Implementation

void subscribe(String topic) {
  mqttClient?.subscribe(topic, MqttQos.atLeastOnce);
  log('Subscribed to topic: $topic');
}