getUserId static method

Stream<String> getUserId()

Implementation

static Stream<String> getUserId() async* {
  if (!isWeb) {
    _channel.invokeMethod('initUserIdListener');
    _userIdEventChannel ??= const EventChannel('MetrixUserIdEvent');
    yield* _userIdEventChannel?.receiveBroadcastStream().cast() ?? Stream.empty();
  } else {
    yield* Stream.empty();
  }
}