Skip to content

Commit

Permalink
Refactor user id getters to directly return the result from platform …
Browse files Browse the repository at this point in the history
…channel
  • Loading branch information
jennantilla committed Mar 21, 2024
1 parent 3791566 commit 6bd8b66
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions lib/src/user.dart
Expand Up @@ -157,16 +157,12 @@ class OneSignalUser {

/// Returns the nullable External ID for the current user.
Future<String?> getExternalId() async {
final String? externalId =
await _channel.invokeMethod("OneSignal#getExternalId");
return externalId;
return await _channel.invokeMethod("OneSignal#getExternalId");
}

/// Returns the nullable OneSignal ID for the current user.
Future<String?> getOnesignalId() async {
final String? onesignalId =
await _channel.invokeMethod("OneSignal#getOnesignalId");
return onesignalId;
return await _channel.invokeMethod("OneSignal#getOnesignalId");
}

/// Add an observer that fires when the OneSignal User state changes.
Expand Down

0 comments on commit 6bd8b66

Please sign in to comment.