ExponeaPlugin class
Properties
hashCode
→ int
The hash code for this object.
no setter inherited
openedPushStream
→ Stream <OpenedPush >
A stream of opened push notifications.
The SDK will hold last data until you set the listener.
Don't forget to call cancel on the subscription when no longer listening.
no setter
receivedPushStream
→ Stream <ReceivedPush >
A stream of received push notifications.
Called for both regular and silent push notifications on Android, and silent notifications only on iOS.
The SDK will hold last data until you set the listener.
Don't forget to call cancel on the subscription when no longer listening.
no setter
runtimeType
→ Type
A representation of the runtime type of the object.
no setter inherited
sdkAuthErrorStream
→ Stream <SdkAuthError >
A stream of SDK auth errors (token about to expire, expired, rejected, etc.).
The SDK will hold last data until you set the listener.
Don't forget to call cancel on the subscription when no longer listening.
no setter
Methods
anonymize ([ConfigurationChange configurationChange = const ExponeaConfigurationChange() ])
→ Future <void >
Anonymize current customer and create a new one.
Push token is cleared on Exponea backend.
Optionally changes default Exponea project and event-project mapping.
checkPushSetup ()
→ Future <void >
Enable automatic push notification diagnostics before configuring the SDK to help you with push notification integration.
clearLocalCustomerData ({String ? appGroup })
→ Future <void >
Removes all locally stored customer data (IDs, tokens, cache) so the SDK starts fresh
NOTE: Android doesn't support using appGroup
configure (ExponeaConfiguration configuration , {CustomerIdentifier ? customerIdentifier })
→ Future <bool >
Configure Exponea SDK.
Should only be called once.
You need to configure ExponeaSDK before calling most methods.
Returns true if configuration was successful. Returns false if sdk was already configured.
fetchAppInbox ()
→ Future <List <AppInboxMessage > >
Fetches AppInbox for the current customer
fetchAppInboxItem (String messageId )
→ Future <AppInboxMessage >
Fetches AppInbox message by ID for the current customer
fetchConsents ()
→ Future <List <Consent > >
Fetch consents for the current customer.
fetchRecommendations (RecommendationOptions options )
→ Future <List <Recommendation > >
Fetch recommendations based on RecommendationOptions.
flushData ()
→ Future <void >
Flush data to Exponea backend.
getCustomerCookie ()
→ Future <String >
Get cookie of the current customer.
getDefaultProperties ()
→ Future <Map <String , dynamic > >
Get default properties tracked with every event
getFlushMode ()
→ Future <FlushMode >
Get current FlushMode used by the SDK.
getFlushPeriod ()
→ Future <Duration >
Get the period with which events are tracked to Exponea backend.
Only valid in FlushMode.period .
getLogLevel ()
→ Future <LogLevel >
Get current LogLevel native SDK uses.
getSegments (String exposingCategory , {bool force = false })
→ Future <List <Map <String , String > > >
Returns segments for the exposing category
handleCampaignClick (String url )
→ Future <void >
Handle Campaign click
handleHmsPushToken (String token )
→ Future <void >
Handle HMS push token
Only for Android
handlePushNotificationOpened (Map <String , dynamic > data )
→ Future <void >
Handle push notification Opened
handlePushNotificationOpenedWithoutTrackingConsent (Map <String , dynamic > data )
→ Future <void >
Handle push notification Opened
handlePushToken (String token )
→ Future <void >
Handle FCM/APNS push token
identifyCustomer (CustomerIdentifier identifier , {Map <String , dynamic > ? properties })
→ Future <void >
Identify current customer with new customer ids and properties.
inAppMessageActionStream ({bool overrideDefaultBehavior = false , bool trackActions = true })
→ Stream <InAppMessageAction >
A stream of In-app message actions.
The SDK will hold last data until you set the listener.
Don't forget to call cancel on the subscription when no longer listening.
If overrideDefaultBehavior is set to true, default in-app action will not be performed ( e.g. deep link )
If trackActions is set to false, click and close in-app events will not be tracked automatically
isBloomreachNotification (Map <String , String > data )
→ Future <bool >
Checks if push notifications originate from bloomreach
isConfigured ()
→ Future <bool >
Check whether Exponea SDK is configured.
markAppInboxAsRead (AppInboxMessage message )
→ Future <bool >
Marks AppInbox message as read
noSuchMethod (Invocation invocation )
→ dynamic
Invoked when a nonexistent method or property is accessed.
inherited
requestIosPushAuthorization ()
→ Future <bool >
Request push authorization on iOS.
requestPushAuthorization ()
→ Future <bool >
Request push authorization on Android or iOS.
segmentationDataStream (String exposingCategory , {bool includeFirstLoad = false })
→ Future <Stream <List <Map <String , String > > > >
Returns stream segments for the exposing category
setAppInboxProvider (AppInboxStyle style )
→ Future <void >
Set AppInboxProvider
setDefaultProperties (Map <String , dynamic > properties )
→ Future <void >
Set default properties tracked with every event.
Only use for reconfiguration, preferred way of setting default properties is configuration object.
setFlushMode (FlushMode mode )
→ Future <void >
Set the Flush mode used by the SDK.
setFlushPeriod (Duration period )
→ Future <void >
Set the period with which events are tracked to Exponea backend.
Only valid in FlushMode.period .
setLogLevel (LogLevel level )
→ Future <void >
Set LogLevel for native SDK.
setSdkAuthToken (String token )
→ Future <void >
Updates the active JWT token used for stream-mode API authentication.
Token is required; clear via anonymize or stopIntegration .
Ignored when not using a Stream integration.
stopIntegration ()
→ Future <void >
Stops the SDK completely, clears all local data, and disables any further tracking until reinitialized
toString ()
→ String
A string representation of this object.
inherited
trackAppInboxClick (AppInboxAction action , AppInboxMessage message )
→ Future <void >
Track AppInbox message click event
Event is tracked if one or both conditions met:
- parameter 'message' has TRUE value of 'hasTrackingConsent' property
- parameter 'buttonLink' has TRUE value of query parameter 'xnpe_force_track'
trackAppInboxClickWithoutTrackingConsent (AppInboxAction action , AppInboxMessage message )
→ Future <void >
Track AppInbox message click event
trackAppInboxOpened (AppInboxMessage message )
→ Future <void >
Track AppInbox message detail opened event
Event is tracked if parameter 'message' has TRUE value of 'hasTrackingConsent' property
trackAppInboxOpenedWithoutTrackingConsent (AppInboxMessage message )
→ Future <void >
Track AppInbox message detail opened event
trackClickedPush (Map <String , dynamic > data )
→ Future <void >
Track clicked push notification
trackClickedPushWithoutTrackingConsent (Map <String , dynamic > data )
→ Future <void >
Track clicked push notification
trackDeliveredPush (Map <String , dynamic > data )
→ Future <void >
Track delivered push notification
trackDeliveredPushWithoutTrackingConsent (Map <String , dynamic > data )
→ Future <void >
Track delivered push notification
trackEvent (Event event )
→ Future <void >
Track custom event to Exponea backend.
trackHmsPushToken (String token )
→ Future <void >
Track HMS push token
Only for Android
trackInAppContentBlockClick (String placeholderId , InAppContentBlock contentBlock , InAppContentBlockAction action )
→ Future <void >
Track in-app content block click event
trackInAppContentBlockClickWithoutTrackingConsent (String placeholderId , InAppContentBlock contentBlock , InAppContentBlockAction action )
→ Future <void >
Track in-app content block click event
trackInAppContentBlockClose (String placeholderId , InAppContentBlock contentBlock )
→ Future <void >
Track in-app content block close event
trackInAppContentBlockCloseWithoutTrackingConsent (String placeholderId , InAppContentBlock contentBlock )
→ Future <void >
Track in-app content block close event
trackInAppContentBlockError (String placeholderId , InAppContentBlock contentBlock , String errorMessage )
→ Future <void >
Track in-app content block error event
trackInAppContentBlockErrorWithoutTrackingConsent (String placeholderId , InAppContentBlock contentBlock , String errorMessage )
→ Future <void >
Track in-app content block error event
trackInAppContentBlockShown (String placeholderId , InAppContentBlock contentBlock )
→ Future <void >
Track in-app content block show event
trackInAppContentBlockShownWithoutTrackingConsent (String placeholderId , InAppContentBlock contentBlock )
→ Future <void >
Track in-app content block show event
trackInAppMessageClick (InAppMessage message , InAppMessageButton button )
→ Future <void >
Track in-app message click event
trackInAppMessageClickWithoutTrackingConsent (InAppMessage message , InAppMessageButton button )
→ Future <void >
Track in-app message click event
trackInAppMessageClose (InAppMessage message , {InAppMessageButton ? button , bool interaction = true })
→ Future <void >
Track in-app message close event
trackInAppMessageCloseWithoutTrackingConsent (InAppMessage message , {InAppMessageButton ? button , bool interaction = true })
→ Future <void >
Track in-app message close event
trackPaymentEvent (PurchasedItem purchasedItem , {DateTime ? timestamp })
→ Future <void >
Track payment event.
trackPushToken (String token )
→ Future <void >
Track FCM/APNS push token
trackSessionEnd ({DateTime ? timestamp })
→ Future <void >
Manually track session end.
Only usable when ExponeaConfiguration.automaticSessionTracking is disabled.
NOTE: iOS doesn't support using a specific timestamp.
trackSessionStart ({DateTime ? timestamp })
→ Future <void >
Manually track session start.
Only usable when ExponeaConfiguration.automaticSessionTracking is disabled.
NOTE: iOS doesn't support using a specific timestamp.