isOptedIn property

bool get isOptedIn

Returns whether the user is currently opted-in to receive push notifications.

Implementation

static bool get isOptedIn {
  return OneSignal.User.pushSubscription.optedIn ?? false;
}