Modules
BaseModule
Declared In:
lib/modules/base/base_module.dart
Declaration:
class BaseModule
Settings
Declared In:
lib/modules/notifications/settings_impl.dart
Declaration:
class SettingsImpl
Properties:
Property | Type | Description |
---|---|---|
sdk | GeneralSettings | General settings - This group contains options related to the general functioning of mobile SDK |
notifications | NotificationsSettings | Notifications settings - This group contains options related to push notifications |
tracker | TrackerSettings | Tracker - This group contains options related to tracking the customer activities in a mobile application |
inAppMessaging | InAppMessagingSettings | In-app messaging - This group contains options related to the in-app messages feature |
injector | InjectorSettings | Injector - This group contains options related to displaying campaigns |
Note:
Learn more about settings here
Notifications
Declared In:
lib/modules/notifications/notifications_impl.dart
Declaration:
class NotificationsImpl
Listeners:
NotificationsListener
Methods:
This method passes the Firebase Token to Synerise for notifications.
void registerForNotifications(String registrationToken, [bool? mobileAgreement])
This method handles a notification payload and starts activity.
Future<bool> handleNotification(Map notification) async
This method handles a notification payload with a user interaction and starts activity.
Future<bool> handleNotificationClick(Map notification) async
This method verifies if a notification was sent by Synerise.
Future<bool> isSyneriseNotification(Map notification) async
This method verifies if a notification’s sender is Synerise and if the notification is a Simple Push campaign
Future<bool> isSyneriseSimplePush(Map notification) async
This method verifies if a notification’s sender is Synerise and if the notification is a Banner campaign.
Future<bool> isSyneriseBanner(Map notification) async
This method verifies if a notification’s sender is Synerise and if the notification is a Silent Command.
Future<bool> isSilentCommand(Map notification) async
This method verifies if a notification’s sender is Synerise and if the notification is a Silent SDK Command.
Future<bool> isSilentSDKCommand(Map notification) async
Client
Declared In:
lib/modules/client/client_impl.dart
Related To:
ClientAccountRegisterContext
ClientIdentityProvider
ClientAuthContext
ClientAccountInformation
ClientAccountUpdateContext
ClientConditionalAuthResult
ClientConditionalAuthenticationContext
ClientAuthenticationContext
ClientPasswordResetRequestContext
ClientPasswordResetConfirmationContext
Token
Inherits From:
BaseModule
Declaration:
class ClientImpl extends BaseModule
Methods:
This method registers a new customer with an email, password, and optional data.
Future<void> registerAccount(ClientAccountRegisterContext context) async
This method confirms a customer account with the confirmation token.
Future<void> confirmAccount(String token) async
This method activates a customer with email.
Future<void> activateAccount(String email) async
This method requests a customer’s account registration process with the PIN code.
Future<void> requestAccountActivationByPin(String email) async
This method confirms a customer’s account registration process with the PIN code.
Future<void> confirmAccountActivationByPin(String email, String pinCode) async
This method signs a customer in to obtain a JSON Web Token (JWT) which can be used in subsequent requests.
Future<void> signIn(String email, String password) async
This method signs a customer in to obtain a JSON Web Token (JWT) which can be used in subsequent requests.
Future<ClientConditionalAuthResult> signInConditionally(String email, String password) async
This method authenticates a customer with OAuth, Facebook, Google, Apple, or Synerise.
Future<bool> authenticate(ClientAuthContext clientAuthContext, IdentityProvider identityProvider, String tokenString) async
This method authenticates a customer with OAuth, Facebook, Google, Apple, or Synerise.
Future<ClientConditionalAuthResult> authenticateConditionally(
ClientAuthContext clientAuthContext, IdentityProvider identityProvider, String tokenString) async
This method authenticates a customer with Simple Authentication.
Future<void> simpleAuthentication(ClientSimpleAuthenticationData clientSimpleAuthenticationData, String authID) async
This method checks if a customer is signed in (via RaaS, OAuth, Facebook, Apple).
Future<bool> isSignedIn() async
This method checks if a customer is signed in (via Simple Authentication).
Future<bool> isSignedInViaSimpleAuthentication() async
This method signs out a customer out.
Future<void> signOut() async
This method signs out a customer out with a chosen mode and Determines if the method should sign out all devices
Future<void> signOutWithMode(ClientSignOutMode mode, bool fromAllDevices) async
This method refreshes the customer’s current token.
Future<void> refreshToken() async
This method retrieves the customer’s current, active token.
Future<Token> retrieveToken() async
This method retrieves the customer’s current UUID.
Future<String> getUUID() async
This method regenerates the UUID and clears the authentication token, login session, custom email, and custom identifier.
Future<void> regenerateUUID() async
This method regenerates the UUID and clears the authentication token, login session, custom email, and custom identifier.
Future<void> regenerateUUIDWithClientIdentifier(String clientIdentifier) async
This method destroys the session completely.
Future<void> destroySession() async
This method gets a customer’s account information.
Future<ClientAccountInformation> getAccount() async
This method updates a customer’s account’s basic information (without identification data: uuid, customId, email).
Future<void> updateAccountBasicInformation(ClientAccountUpdateBasicInformationContext clientAccountUpdateBasicInformationContext) async
This method updates a customer’s account information.
Future<void> updateAccount(ClientAccountUpdateContext clientAccountUpdateContext) async
This method requests a customer’s password reset with email.
Future<void> requestPasswordReset(String email) async
This method confirm a customer’s password reset with the new password and token provided by password reset request.
Future<void> confirmPasswordReset(String token, String password) async
This method changes a customer’s password.
Future<void> changePassword(String oldPassword, String password) async
This method requests a customer’s email change.
Future<void> requestEmailChange(String email, String password, [String? externalToken, String? authID]) async
This method confirms an email change.
Future<void> confirmEmailChange(String token, bool newsletterAgreement) async
Requests a customer’s phone update. A confirmation code is sent to the phone number.
Future<void> requestPhoneUpdate(String phone) async
This method confirms a phone number update. This action requires the new phone number and confirmation code as parameters.
Future<void> confirmPhoneUpdate(String phone, String confirmationCode, bool smsAgreement) async
This method deletes a customer’s account.
Future<void> deleteAccount(String clientAuthFactor, IdentityProvider identityProvider, String? authId) async
Tracker
Declared In:
lib/modules/tracker/tracker_impl.dart
Related To:
Event
CustomEvent
Inherits From:
BaseModule
Declaration:
class TrackerImpl extends BaseModule
Methods:
This method sets a custom identifier in the parameters of every event.
Future<void> setCustomIdentifier(String customIdentifier) async
This method sets a custom email in the parameters of every event.
Future<void> setCustomEmail(String customEmail) async
This method sends an event.
Future<void> send(Event event) async
This method forces sending the events from the queue to the server.
Future<void> flush() async
Injector
Declared In:
lib/modules/injector/injector_impl.dart
Inherits From:
BaseModule
Declaration:
class InjectorImpl extends BaseModule
Listeners:
InjectorListener
InjectorInAppMessageListener
Methods:
This method fetches a walkthrough.
void getWalkthrough() async
This method shows a walkthrough when it is loaded.
void showWalkthrough() async
This method checks if a walkthrough is loaded.
Future<bool> isWalkthroughLoaded() async
This method checks if the walkthrough is unique compared to the previous one.
Future<bool> isLoadedWalkthroughUnique() async
Promotions
The module for handling promotions and vouchers from Synerise SDK.
Declared In:
lib/modules/promotions/promotions_impl.dart
Related To:
PromotionResponse
Promotion
AssignVoucherResponse
VoucherCodesResponse
Inherits From:
Module
Declaration:
class PromotionsImpl extends BaseModule
Methods:
This method retrieves all available promotions that are defined for a customer.
Future<PromotionResponse> getAllPromotions() async
This method retrieves promotions that match the parameters defined in an API query.
Future<PromotionResponse> getPromotions(PromotionsApiQuery promotionsApiQuery) async
This method retrieves the promotion with the specified UUID.
Future<Promotion> getPromotionByUUID(String uuid) async
This method retrieves the promotion with the specified code.
Future<Promotion> getPromotionByCode(String code) async
This method activates the promotion with the specified UUID.
Future<void> activatePromotionByUUID(String uuid) async
This method activates the promotion with the specified code.
Future<void> activatePromotionByCode(String code) async
This method activates promotions with a code or with UUID in a batch.
Future<void> activatePromotionsBatch(List<PromotionIdentifier> promotionsToActivate) async
This method deactivates the promotion with the specified UUID.
Future<void> deactivatePromotionByUUID(String uuid) async
This method deactivates the promotion with the specified code.
Future<void> deactivatePromotionByCode(String code) async
This method deactivates promotions with a code or with UUID in a batch.
Future<void> deactivatePromotionsBatch(List<PromotionIdentifier> promotionsToDeactivate) async
This method retrieves an assigned voucher code or assigns a voucher from a pool identified by UUID to the profile.
When the voucher is assigned for the first time, a voucherCode.assigned event is produced.
Future<AssignVoucherResponse> getOrAssignVoucher(String poolUuid) async
This method assigns a voucher from a pool identified by UUID to the profile.
A voucherCode.assigned event is produced.
Future<AssignVoucherResponse> assignVoucherCode(String poolUuid) async
This method retrieves voucher codes for a customer.
Future<VoucherCodesResponse> getAssignedVoucherCodes() async
Content
The module for handling content from Synerise backend such as documents, recommendations, and so on.
Declared In:
lib/modules/content/content_impl.dart
Related To:
DocumentsApiQuery
Document
RecommendationResponse
RecommendationOptions
Recommendation
ScreenView
ScreenViewAudienceInfo
Inherits From:
BaseModule
Declaration:
class ContentImpl extends BaseModule
Methods:
This method generates the document that is defined for the provided slug.
Future<Document> generateDocument(String slug) async
This method generates the document that is defined for parameters provided in the query object.
Future<void> generateDocumentWithApiQuery(DocumentApiQuery apiQuery, ([ScreenView](/developers/mobile-sdk/class-reference/flutter/miscellaneous/#screenview)), ([SyneriseError](/developers/mobile-sdk/class-reference/flutter/miscellaneous/#syneriseerror) error)) async
This method generates recommendations that are defined for the options provided.
Future<RecommendationResponse> getRecommendationsV2(RecommendationOptions recommendationOptions) async
This method generates the document assigned to a slug.
Future<Map<String, Object>> getDocument(String slugName) async
This method generates documents that are defined for parameters provided in the query object.
Future<List<Map<String, Object>>> getDocuments(DocumentsApiQuery documentsApiQueryModel) async
This method generates recommendations that are defined for the options provided.
Future<RecommendationResponse> getRecommendations(RecommendationOptions recommendationOptions) async
This method generates the customer’s highest-priority screen view campaign.
Future<ScreenViewResponse> getScreenView() async
This method generates customer’s highest-priority screen view campaign that is defined for parameters provided in the query object.
Future<void> generateScreenViewWithApiQuery(ScreenViewApiQuery apiQuery, ([Document](/developers/mobile-sdk/class-reference/flutter/recommendations-and-documents/#document)), ([SyneriseError](/developers/mobile-sdk/class-reference/flutter/miscellaneous/#syneriseerror) error)) async