BatchPush class

Provides push related functionality. Do not instanciate this: use the instance static property.

Constructors

BatchPush()

Properties

hashCode int
The hash code for this object.
no setterinherited
lastKnownPushToken Future<String?>
Get the last known push token. This might be null if the SDK never successfully registered to push notifcations.
no setter
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
requestNotificationAuthorization() → void
Call this method to trigger the iOS/Android 13 popup that asks the user if they want to allow notifications to be displayed. You should call this at a strategic moment, like at the end of your onboarding.
requestProvisionalNotificationAuthorization() → void
Call this method to ask iOS for a provisional notification authorization. Batch will then automatically ask for a push token. This does not do anything on Android.
setShowForegroundNotificationsOniOS(bool showForegroundNotifications) → void
Toggles whether iOS should show notifications when the app is in foreground or not.
toString() String
A string representation of this object.
inherited

Operators

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

Static Properties

instance BatchPush
Batch User module singleton.
getter/setter pair