Flutter listeners

NotificationsListener


A listener to handle actions from the notifications module.

Synerise.notifications.listener((listener) {
  // The following method is called when registration for Push Notifications is needed.
  listener.onRegistrationRequired = () {
    ...
  };
});
Note: After invoking onRegistrationRequired function, you must invoke the Synerise.notifications.registerForNotifications(registrationToken, mobileAgreement) method again.

InjectorListener


A listener to handle actions from activities.

Synerise.injector.listener((listener) {
  // The following method is called when Synerise handles URL action from campaign activities
  // It is required function
  listener.onOpenUrl = (url) {
  	...
  };
  // The following method is called when Synerise handles deep link action from campaign activities
  // It is required function
  listener.onDeepLink = (deepLink) {
    ...
  };
});

InjectorBannerListener


A listener to handle the states of a banner.

Synerise.injector.bannerListener((listener) {
  // The following method is called after a banner appears
  listener.onPresent = () {
    ...
  };
  // The following method is called when a banner disappears
  listener.onHide = () {
    ...
  };
});

InjectorInAppMessageListener


A listener to handle the states of in-app messages.

Synerise.injector.inAppMessageListener((listener) {
  // The following method is called after an in-app message appears
  listener.onPresent = (data) {
    ...
  };
  // The following method is called after an in-app message disappears
  listener.onHide = (data) {
    ...
  };
  // The following method is called when Synerise handles URL action from in-app messages
  listener.onOpenUrl = (data, url) {
      ...
  };
  // The following method is called when Synerise handles deeplink action from in-app messages
  listener.onDeepLink = (data, deepLink) {
    ...
  };
  // The following method is called when Synerise handles custom action from in-app messages
  listener.onCustomAction = (data, name, parameters) {
    ...
  };
})

InjectorWalkthroughListener


A listener to handle the states of a walkthrough.

Synerise.injector.walkthroughListener((listener) {
  // The following method is called when a walkthrough is loaded
  listener.onLoad = () {
    ...
  };
  // The following method is called when an error occurs while loading the walkthrough
  listener.onLoadingError = () {
    ...
  };
  // The following method is called after a walkthrough appears
  listener.onPresent = () {
    ...
  };
  // The following method is called when a walkthrough disappears
  listener.onHide = () {
    ...
  };
});
😕

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