subscribe method

Future<Subscription> subscribe(
  1. String key,
  2. String channel, {
  3. int last = 0,
})

Implementation

Future<Subscription> subscribe(
  String key,
  String channel, {
  int last = 0,
}) async {
  // var options = new Map<String, String>();
  // if (last > 0) options["last"] = last.toString();
  var topic = _formatChannel(key, channel, {});
  return _mqtt!.subscribe(topic, MqttQos.atLeastOnce)!;
}