subscribeToInAppEventListener method

  1. @override
StreamSubscription subscribeToInAppEventListener(
  1. void onEvent(
    1. InAppEvent
    )
)
override

Method to subscribe to the In-App event listener.

The onEvent function will be called whenever an In-App event occurs. Returns a StreamSubscription object that can be used to unsubscribe from the stream.

Implementation

@override
StreamSubscription subscribeToInAppEventListener(
    void Function(InAppEvent) onEvent) {
  StreamSubscription subscription =
      _inAppEventStreamController.stream.listen(onEvent);
  return subscription;
}