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
-
onJavascriptInterfaceCall
→ Stream<
Map< String, dynamic> > -
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
-
addJavascriptInterface(
String interfaceName, Map< String, Function> methods) → Future<void> -
Register a JavaScript interface with Flutter method handlers
interfaceName- name that will be available in JavaScript as window.interfaceNamemethods- map of method names to their Flutter implementations -
addToApplicationIconBadgeNumber(
int badges) → void -
defaultSetup(
) → Future< void> - Default setup Live Activity
-
defaultStart(
String activityId, Map< String, dynamic> attributes, Map<String, dynamic> content) → Future<void> -
Default start Live Activity
activityIdactivity IDattributesattributescontentcontent -
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.
eventis string name of the eventattributesis map contains additional event attributes -
registerForPushNotifications(
) → Future< String?> - Registers device for push notifications
-
registerSmsNumber(
String number) → void -
registerWhatsappNumber(
String number) → void -
removeJavascriptInterface(
String interfaceName) → Future< void> -
Remove a JavaScript interface
interfaceName- name of the interface to remove -
requestProvisionalAuthOptions(
) → void -
setApplicationIconBadgeNumber(
int badges) → void -
setEmail(
String email) → Future< void> - Register email associated to the current user. Email should be a string and cannot be null or empty.
-
setEmails(
List< String> emails) → Future<void> - Register list of emails associated to the current user.
-
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.
onenable 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. -
setUserEmails(
String userId, List< String> emails) → Future<void> - Set user identifier and register emails associated to the user. userID can be Facebook ID or any other user ID. This allows data and events to be matched across multiple user devices.
-
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.
-
startLiveActivityWithToken(
String token, String activityId) → Future< void> -
Start Live Activity with ActivityId
tokenlive activity tokenactivityIdactivity ID -
startServerCommunication(
) → void - Starts server communication with Pushwoosh.
-
stopLiveActivity(
) → Future< void> - Stop Live Activity
-
stopServerCommunication(
) → void - Stops server communication with Pushwoosh.
-
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"}