subscribe static method

Stream subscribe(
  1. String identifier,
  2. String eventName, {
  3. bool onlyOnce = false,
})

Subscribes to BlueConic events with a specific identifier and event name.

This method allows you to listen for specific BlueConic events such as dialogue events, profile updates, or other SDK notifications. The stream will emit events as they occur.

identifier A unique identifier for this subscription eventName The name of the event to subscribe to onlyOnce Whether to receive the event only once or continuously (defaults to false) Returns a Stream<dynamic> that emits events as they occur

Implementation

static Stream<dynamic> subscribe(
  String identifier,
  String eventName, {
  bool onlyOnce = false,
}) {
  return BlueConicPlatform.instance.subscribe(
    identifier,
    eventName,
    onlyOnce: onlyOnce,
  );
}