Created
July 7, 2019 03:32
-
-
Save ricardoogliari/95c504c1210a24e858b0dfdd0096a971 to your computer and use it in GitHub Desktop.
subscribeToTopic.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void _subscribeToTopic(String topic) { | |
if (connectionState == mqtt.MqttConnectionState.connected) { | |
client.subscribe(topic, mqtt.MqttQos.exactlyOnce); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment