subscription method

Subscription subscription({
  1. Set<String>? channels,
  2. Set<String>? channelGroups,
  3. bool withPresence = false,
  4. Keyset? keyset,
  5. String? using,
  6. Timetoken? timetoken,
})
inherited

Creates an inactive subscription to channels and channelGroups. Returns Subscription.

You can activate an inactive subscription by calling subscription.subscribe().

Implementation

Subscription subscription(
    {Set<String>? channels,
    Set<String>? channelGroups,
    bool withPresence = false,
    Keyset? keyset,
    String? using,
    Timetoken? timetoken}) {
  keyset ??= keysets[using];

  var manager = _getOrCreateManager(keyset);

  var subscription = manager.createSubscription(
      channels: channels,
      channelGroups: channelGroups,
      withPresence: withPresence,
      timetoken: timetoken);

  return subscription;
}