Modules

Synerise

Main SDK class responsible for managing all Synerise modules and functionalities.

Declared In

lib/synerise.dart

Notifications
Client
Tracker
Injector
Content

Declaration

class Synerise


Synerise Initializer

Class responsible for initialization of Synerise Flutter SDK.

Declared In

lib/main/synerise_initializer.dart

Declaration

class SyneriseInitializer

Methods

WithClientApiKey

Sets api key to SDK.

SyneriseInitializer withClientApiKey(String clientApiKey)


WithBaseUrl

Sets base url to SDK.

SyneriseInitializer withBaseUrl(String baseUrl)


WithDebugModeEnabled

Sets the debug mode to SDK. When debug mode is set to true you will see logs from networking and from sdk mechanisms in your console.

SyneriseInitializer withDebugModeEnabled(bool debugModeEnabled)


WithCrashHandlingEnabled

Sets crash handling inside sdk. If set to true Synerise SDK will send event client.applicationCrashed with information about crash.

SyneriseInitializer withCrashHandlingEnabled(bool crashHandlingEnabled)


Init

Function responsible for initialization of sdk.

Future<void> init() async



BaseModule

Main module class for modules inheritance and storing initialization status.

Declared In

lib/modules/base/base_module.dart

Declaration

class BaseModule


Notifications

Declared In

lib/modules/notifications/notifications_impl.dart

Declaration

class NotificationsImpl

Methods

Links your deviceId with firebaseToken. (Click for more details)

void registerForNotifications(String registrationToken, bool mobileAgreement)


Method responsible for handling push notification. (Click for more details)

Future<bool> handleNotification(Map notification) async


Method responsible for handling notification click. (Click for more details)

Future<bool> handleNotificationClick(Map notification) async

Listeners

NotificationListener



Client

The module for managing customer account data, registration, and authorization.

Declared In

lib/modules/client/client_impl.dart

ClientAccountRegisterContext
ClientIdentityProvider
ClientAuthContext
ClientAccountInformation
ClientAccountUpdateContext
Token

Inherits From

BaseModule

Declaration

class ClientImpl extends BaseModule 

Methods

Registers a new customer account. (Click for more details)

registerAccount(ClientAccountRegisterContext clientAccountRegisterContext)


Confirms a customer’s account. (Click for more details)

confirmAccount(String token)


Activates a customer’s account. (Click for more details)

activateAccount(String email)


Signs a customer in with email and password. (Click for more details)

signIn(String email, String password)


Signs a customer in with an external token. (Click for more details)

authenticate(ClientAuthContext clientAuthContext, IdentityProvider identityProvider, String tokenString)


Checks if a customer is signed in (if customer’s token is not expired). (Click for more details)

bool isSignedIn = isSignedIn()


Signs out a customer. (Click for more details)

signOut()


Refreshes the customer’s token. (Click for more details)

refreshToken()


Retrieves the customer’s token. (Click for more details)

Token token = retrieveToken() 


Retrieves the customer’s UUID. (Click for more details)

String uuid = getUUID()


Regenerates the customer’s UUID and clears authentication token, login (if applicable), custom email, and custom identifier. (Click for more details)

regenerateUUID()


Destroys the whole session completely. (Click for more details)

destroySession()


Gets a customer’s account information. (Click for more details)

ClientAccountInformation clientAccountInformation = getAccount()


Updates a customer’s account information. (Click for more details)

updateAccount(ClientAccountUpdateContext clientAccountUpdateContext)


Requests a customer’s password reset with email. (Click for more details)

requestPasswordReset(String email)


Confirms a customer’s password reset with a new password and token. (Click for more details)

confirmPasswordReset(String password, String token)


Changes a customer’s password. (Click for more details)

changePassword(String oldPassword, String newPassword)


Deletes a customer’s account information. (Click for more details)

deleteAccountByIdentityProvider(String clientAuthFactor, ClientIdentityProvider clientIdentityProvider, String authID)




Tracker

The module for sending event tracking data to Synerise backend. Tracking is performed by creating pre-defined or custom event objects and sending these to Synerise. It also includes automatic event interception by the Auto-Tracking feature.

Declared In

lib/modules/tracker/tracker_impl.dart

Event

Inherits From

BaseModule

Declaration

class TrackerImpl extends BaseModule

Methods

Sets the custom identifier for the current customer. The custom identifier will be sent with every event in event params. (Click for more details)

setCustomIdentifier(String identifier)


Sets the custom email for the current customer. The custom email will be sent with every event in event params. (Click for more details)

setCustomEmail(String email)


Adds a new event to the queue and sends available events to the server if possible. (Click for more details)

send(Event event)


Sends events from the queue to the server by force. (Click for more details)

flush()



Injector

Declared In

lib/modules/injector/injector_impl.dart

Declaration

class InjectorImpl

Methods

Method responsible for showing walkthrough. (Click for more details)

showWalkthrough()


Method responsible for downloading walkthrough. (Click for more details)

getWalkthrough()


Method responsible for checking if responsible is loaded. (Click for more details)

isWalkthroughLoaded()


Method responsible for checking if loaded walkthrough is unique. (Click for more details)

isLoadedWalkthroughUnique()

Listeners

For more information please check:

InjectorListener
InjectorBannerListener
InjectorInAppMessageListener
InjectorWalkthroughListener



Content

The module for handling content from Synerise backend such as documents, recommendations, and so on.

Declared In

lib/modules/content/content_impl.dart

RecommendationResponse
Recommendation
DocumentsApiQuery

Inherits From

BaseModule

Declaration

class ContentImpl extends BaseModule

Methods

Gets the document that is defined for the provided slug. (Click for more details)

documentJson = getDocument(String slug)


Gets documents that are defined for parameters provided in the query object. (Click for more details)

documentsJson = getDocuments(DocumentsApiQuery apiQuery)


Gets recommendations that are defined for the options provided. (Click for more details)

recommendationsResponseJson = getRecommendations(RecommendationOptions options)


Gets the customer’s highest-priority screen view campaign. (Click for more details)

screenViewResponseJson = getScreenView()

😕

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