Pushwoosh class
Pushwoosh class offers access to the singleton-instance responsible for registering the device with the Pushwoosh, receiving and processing push notifications
Constructors
Properties
-
getApplicationIconBadgeNumber
→ Future<
int> -
no setter
-
getHWID
→ Future<
String> -
Pushwoosh HWID associated with current device
no setter
-
getPushToken
→ Future<
String?> -
Push notification token or null if device is not registered yet.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
-
onDeepLinkOpened
→ Stream<
String> -
Get the Stream of opened deep links
no setter
-
onPushAccepted
→ Stream<
PushEvent> -
Get the Stream of accepted PushwooshMessage.
no setter
-
onPushReceived
→ Stream<
PushEvent> -
Get the Stream of received PushwooshMessage.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
showForegroundAlert
→ Future<
bool> -
no setter
Methods
-
addToApplicationIconBadgeNumber(
int badges) → void -
enableHuaweiNotifications(
) → void -
getTags(
) → Future< Map> - Gets tags associated with current device
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
postEvent(
String event, Map< String, dynamic> attributes) → Future<void> -
Post events for In-App Messages. This can trigger In-App message HTML as specified in Pushwoosh Control Panel.
event
is string name of the eventattributes
is map contains additional event attributes -
registerForPushNotifications(
) → Future< String?> - Registers device for push notifications
-
setApplicationIconBadgeNumber(
int badges) → void -
setLanguage(
String language) → void -
setMultiNotificationMode(
bool on) → void -
Allows multiple notifications to be displayed in notification center.
By default SDK uses single notification mode where each notification overrides previously displayed notification.
on
enable multi/single notification mode -
setShowForegroundAlert(
bool value) → void -
Show push notifications alert when push notification is received while the app is running, default is
true
-
setTags(
Map tags) → Future< void> -
Associates device with given
tags
. If setTags request fails tags will be resent on the next application launch. -
setUserId(
String userId) → void - Set User indentifier. This could be Facebook ID, username or email, or any other user ID. This allows data and events to be matched across multiple user devices.
-
toString(
) → String -
A string representation of this object.
inherited
-
unregisterForPushNotifications(
) → Future< String?> - Unregisters device from push notifications
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- getInstance → Pushwoosh
-
Returns the default (first initialized) instance of the Pushwoosh.
no setter
Static Methods
-
initialize(
Map params) → void - initialize Pushwoosh SDK. Example params: {"app_id": "application id", "sender_id": "GCM/FCM sender id"}