getSessionId static method

Stream<String> getSessionId()

Implementation

static Stream<String> getSessionId() async* {
  if (!isWeb) {
    _channel.invokeMethod('initSessionIdListener');
    _sessionIdEventChannel ??= const EventChannel('MetrixSessionIdEvent');
    yield* _sessionIdEventChannel?.receiveBroadcastStream().cast() ?? Stream.empty();
  } else {
    yield* Stream.empty();
  }
}