Campaigns


Set Injector listener


This method sets callbacks for an injector module.

Declared In:
lib/modules/injector/injector_impl.dart

Related To:
InjectorListener

Class:
InjectorImpl

Declaration:

void listener(InjectorListenerFunction listenerFunction)

Discussion:
Learn more about the methods and their purpose of this listener here.

Set Walkthrough listener


This method sets callbacks for walkthrough campaigns.

Declared In:
lib/modules/injector/injector_impl.dart

Related To:
InjectorWalkthroughListener

Class:
InjectorImpl

Declaration:

void walkthroughListener(InjectorWalkthroughListenerFunction listenerFunction)

Discussion:
Learn more about the methods and the purpose of this listener here.

Set Banner listener


This method sets callbacks for banner campaigns.

Declared In:
lib/modules/injector/injector_impl.dart

Related To:
InjectorBannerListener

Class:
InjectorImpl

Declaration:

void bannerListener(InjectorBannerListenerFunction listenerFunction)

Discussion:
Learn more about the methods and their purpose of this listener here.

Set In-App Message listener


This method sets callbacks for in-app message campaigns.

Declared In:
lib/modules/injector/injector_impl.dart

Related To:
InjectorInAppMessageListener

Class:
InjectorImpl

Declaration:

void inAppMessageListener(InjectorInAppMessageListenerFunction listenerFunction)

Discussion:
Learn more about the methods and their purpose of this listener here.

Register for push notifications


This method passes the Firebase Token to Synerise for notifications.

Note: The API key must have the API_BY_IDENTIFY_DEVICE_CLIENT_UPDATE permission from the Client group.

Declared In:
lib/modules/notifications/notifications_impl.dart

Class:
NotificationsImpl

Declaration:

void registerForNotifications(String registrationToken, [bool? mobileAgreement])

Parameters:

Parameter Type Mandatory Default Description
registrationToken String yes - Firebase Token
mobileAgreement bool no null Agreement (consent) for receiving mobile push campaigns

Return Value:
No value is returned.

Example:

FirebaseMessaging.instance.onTokenRefresh.listen((event) {
  FirebaseMessaging.instance.getToken().then((value) {
    if (value != null) {
      Synerise.notifications.registerForNotifications(value, true);
    }
  });
});
FirebaseMessaging.instance.getToken().then((value) {
  if (value != null) {
    Synerise.notifications.registerForNotifications(value, true);
  }
});

Handle Synerise push notification


This method handles a notification payload and starts activity.

Declared In:
lib/modules/notifications/notifications_impl.dart

Class:
NotificationsImpl

Declaration:

Future<bool> handleNotification(Map notification) async

Parameters:

Parameter Type Mandatory Default Description
notification Map<String, dynamic> yes - Notification’s key-value data object

Return Value:
No value is returned.

Example:

FirebaseMessaging.onMessage.listen((RemoteMessage message,) {
  Synerise.notifications.handleNotification(message.toMap());
});

FirebaseMessaging.onMessageOpenedApp.listen((RemoteMessage message) {
  Synerise.notifications.handleNotificationClick(message.toMap());
});

Handle Synerise push notification click


This method handles a notification payload with a user interaction and starts activity.

Declared In:
lib/modules/notifications/notifications_impl.dart

Class:
NotificationsImpl

Declaration:

Future<bool> handleNotificationClick(Map notification) async

Parameters:

Parameter Type Mandatory Default Description
notification Map<String, dynamic> yes - Notification’s key-value data object

Return Value:
No value is returned.

Example:

FirebaseMessaging.onMessage.listen((RemoteMessage message,) {
  Synerise.notifications.handleNotification(message.toMap());
});

FirebaseMessaging.onMessageOpenedApp.listen((RemoteMessage message) {
  Synerise.notifications.handleNotificationClick(message.toMap());
});

Get Walkthrough


This method fetches a walkthrough.

Note: The API key must have the CAMPAIGN_BACKEND_CAMPAIGN_READ permission from the Campaign group.

Declared In:
lib/modules/injector/injector_impl.dart

Class:
InjectorImpl

Declaration:

void getWalkthrough()

Return Value:
No value is returned.

Example:

Synerise.injector.getWalkthrough();

Show Walkthrough


This method shows a walkthrough when it is loaded.

Declared In:
lib/modules/injector/injector_impl.dart

Class:
InjectorImpl

Declaration:

void showWalkthrough()

Return Value:
No value is returned.

Example:

Synerise.injector.showWalkthrough();

Check if Walkthrough is loaded


This method checks if a walkthrough is loaded.

Declared In:
lib/modules/injector/injector_impl.dart

Class:
InjectorImpl

Declaration:

Future<bool> isWalkthroughLoaded()

Return Value:
true if the walkthrough is loaded, otherwise returns false.

Example:

var isLoaded = await Synerise.injector.isWalkthroughLoaded();

Check if is loaded Walkthrough unique


This method checks if the walkthrough is unique compared to the previous one.

Declared In:
lib/modules/injector/injector_impl.dart

Class:
InjectorImpl

Declaration:

Future<bool> isLoadedWalkthroughUnique()

Return Value:
true if the loaded walkthrough is unique, otherwise returns false.

Example:

var isLoaded = await Synerise.injector.isLoadedWalkthroughUnique();

😕

We are sorry to hear that

Thank you for helping improve out documentation. If you need help or have any questions, please consider contacting support.

😉

Awesome!

Thank you for helping improve out documentation. If you need help or have any questions, please consider contacting support.

Close modal icon Placeholder alt for modal to satisfy link checker