This is either a documentation omission, or a misunderstanding on my part.
In Flutter, how do you get the userid/playerid at any given time? I understand that you can use OneSignal.shared.setSubscriptionObserver() to get the userID initially, but is there really no way at all to get the userID again later?
In some parts of the documentation, I've seen references to getUserId and idsAvailable, but OneSignal.shared.getUserId and OneSignal.shared.idsAvailable are not valid functions.
Can you try String onesignalUserId = status.subscriptionStatus.userId;
https://documentation.onesignal.com/docs/flutter-sdk#section--getpermissionsubscriptionstate-
That works, thank you.
Most helpful comment
Can you try
String onesignalUserId = status.subscriptionStatus.userId;https://documentation.onesignal.com/docs/flutter-sdk#section--getpermissionsubscriptionstate-