Pushwoosh class

Pushwoosh class offers access to the singleton-instance responsible for registering the device with the Pushwoosh, receiving and processing push notifications

Constructors

Pushwoosh()

Properties

getHWID → Future<String>
Pushwoosh HWID associated with current device
read-only
getPushToken → Future<String>
Push notification token or null if device is not registered yet.
read-only
onPushAccepted → Stream<PushEvent>
Get the Stream of accepted PushwooshMessage.
read-only
onPushReceived → Stream<PushEvent>
Get the Stream of received PushwooshMessage.
read-only
showForegroundAlert ↔ Future<bool>
Show push notifications alert when push notification is received while the app is running, default is true
read / write
hashCode → int
The hash code for this object. [...]
read-only, inherited
runtimeType → Type
A representation of the runtime type of the object.
read-only, inherited

Methods

getTags() → Future<Map>
Gets tags associated with current device
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 event attributes is map contains additional event attributes
registerForPushNotifications() → Future<String>
Registers device for push notifications
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.
unregisterForPushNotifications() → Future<String>
Unregisters device from push notifications
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() → String
Returns a string representation of this object.
inherited

Operators

operator ==(dynamic other) → bool
The equality operator. [...]
inherited

Static Properties

getInstance Pushwoosh
Returns the default (first initialized) instance of the Pushwoosh.
read-only

Static Methods

initialize(Map params) → void
initialize Pushwoosh SDK. Example params: {"app_id": "application id", "sender_id": "GCM/FCM sender id"}