SupaNotificationService class
final
Methods
-
dispose()
→ void
-
Closes the stream controller. Call when the service is no longer needed.
-
hasPermission()
→ Future<bool>
-
Returns
true if the user has granted notification permission.
-
init({required NotificationOptions options})
→ Future<void>
-
Initialises OneSignal and sets up all listeners.
-
noSuchMethod(Invocation invocation)
→ dynamic
-
Invoked when a nonexistent method or property is accessed.
inherited
-
optIn()
→ void
-
Opts the user in to push notifications.
-
optOut()
→ void
-
Opts the user out of push notifications.
-
removeExternalUserId()
→ void
-
Unlinks the external user ID.
-
removeTag(String key)
→ void
-
Removes a single tag by
key.
-
removeTags(List<String> keys)
→ void
-
Removes multiple tags by their
keys.
-
requestPermission()
→ Future<bool>
-
Prompts the user for notification permission.
-
reset()
→ void
-
Logs out the current user and resets initialisation state.
Call on user logout so the next init re-attaches a fresh user.
-
sendTags(Map<String, dynamic> tags)
→ void
-
Adds or updates user tags used for segmentation.
-
setExternalUserId(String userId)
→ void
-
Links this device to an external user ID (e.g. your backend user ID).
-
toString()
→ String
-
A string representation of this object.
inherited