OneSignal class

Constructors

OneSignal()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

Debug ↔ OneSignalDebug
A singleton representing the OneSignal SDK. Note that the iOS and Android native libraries are static, so if you create multiple instances of OneSignal, they will mostly share the same state.
getter/setter pair
InAppMessages OneSignalInAppMessages
getter/setter pair
LiveActivities OneSignalLiveActivities
getter/setter pair
Location ↔ OneSignalLocation
getter/setter pair
Notifications OneSignalNotifications
getter/setter pair
Session ↔ OneSignalSession
getter/setter pair
User ↔ OneSignalUser
getter/setter pair

Static Methods

consentGiven(bool granted) Future<void>
Sets the whether or not privacy consent has been granted
consentRequired(bool require) Future<void>
Allows you to completely disable the SDK until your app calls the OneSignal.consentGiven(true) function. This is useful if you want to show a Terms and Conditions or privacy popup for GDPR.
initialize(String appId) → void
The initializer for OneSignal.
login(String externalId) Future<void>
Login to OneSignal under the user identified by the externalId provided.
loginWithJWT(String externalId, String jwt) Future<void>
Login to OneSignal under the user identified by the externalId provided.
logout() Future<void>
Logout the user previously logged in via login. The user property now