Campaigns

Register for Push Notifications


Use this method to pass the Firebase Token to Synerise for notifications.

Declared In

lib/modules/notifications/notifications_impl.dart

Method

void registerForNotifications(String registrationToken, bool mobileAgreement)

Parameters

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

Return Value

There is no return value.

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


Handles a notification payload and starts activity.

Declared In

lib/modules/notifications/notifications_impl.dart

Method

Future<bool> handleNotification(Map notification) async

Parameters

Parameter Type Mandatory Default Description
notification Map yes - Notification’s key-value data object

Return Value

There is no return value.

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


Handles a notification payload with user interaction and starts activity.

Declared In

lib/modules/notifications/notifications_impl.dart

Method

Future<bool> handleNotificationClick(Map notification) async

Parameters

Parameter Type Mandatory Default Description
notification Map yes - Notification’s key-value data object

Return Value

There is no return value.

Example

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

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

Get Walkthrough


Fetches a walkthrough.

Declared In

lib/modules/injector/injector_impl.dart

Method

void getWalkthrough()

Return Value

There is no return value.

Example

Synerise.injector.getWalkthrough();

Show Walkthrough


Shows a walkthrough when it is loaded.

Declared In

lib/modules/injector/injector_impl.dart

Method

void showWalkthrough()

Return Value

There is no return value.

Example

Synerise.injector.showWalkthrough();

Check if Walkthrough is loaded


Checks if a walkthrough is loaded.

Declared In

lib/modules/injector/injector_impl.dart

Method

Future<bool> isWalkthroughLoaded()

Return Value

There is no return value.

Example

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

Check if is loaded Walkthrough unique


Checks if the walkthrough is unique compared to the previous one.

Declared In

lib/modules/injector/injector_impl.dart

Method

Future<bool> isLoadedWalkthroughUnique()

Return Value

There is no return value.

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