EmmaFlutterSdk class
Properties
hashCode
→ int
The hash code for this object.
no setter inherited
runtimeType
→ Type
A representation of the runtime type of the object.
no setter inherited
Methods
addProduct (EmmaProduct product )
→ Future <void >
This method adds one product to the initied order. If you want add multiple
products, you call this method multiples times.
areNotificationsEnabled ()
→ Future <bool >
Android only
This method returns if devices can receive notifications or not.
cancelOrder (String orderId )
→ Future <void >
This method cancel order previously added.
checkForRichPush ()
→ Future <void >
Android Only
Checks if rich push is available after push is opened.
This method can be called anywhere in app.
disableUserTracking (bool deleteUser )
→ Future <void >
enableUserTracking ()
→ Future <void >
getEMMAVersion ()
→ Future <String >
Retrieves current EMMA SDK Version
handleLink (String url )
→ Future <void >
inAppMessage (EmmaInAppMessageRequest request )
→ Future <void >
Checks for an InApp Message
You must pass EmmaInAppMessageRequest of message you're expecting
isUserTrackingEnabled ()
→ Future <bool >
loginUser (String userId , String email )
→ Future <void >
Sends a login to EMMA
userId
is your customer id for this user
email
is a unique email of this user
noSuchMethod (Invocation invocation )
→ dynamic
Invoked when a nonexistent method or property is accessed.
inherited
openNativeAd (EmmaNativeAd nativeAd )
→ Future <void >
Opens native ad CTA inapp or outapp. This method track native ad click automatically. It is not necessary call to sendInAppClick method.
nativeAd
The native ad
registerUser (String userId , String email )
→ Future <void >
Sends register event to EMMA
userId
is your customer id for this user
email
is a unique email of this user
requestNotificationsPermission ()
→ Future <void >
Android only
This method requests notifications permission on Android 13 or higher devices.
requestTrackingWithIdfa ()
→ Future <void >
iOS only
This method requests the permission to collect the IDFA.
sendInAppClick (InAppType inAppType , int campaignId )
→ Future <void >
Sends click associated with inapp campaign. This method is mainly used to send native ad clicks.
Formats startview, banner, adball send click automatically
campaignId
The campaign identifier
sendInAppImpression (InAppType inAppType , int campaignId )
→ Future <void >
Sends impression associated with inapp campaign. This method is mainly used to send native Ad impressions.
Formats startview, banner, adball send impression automatically
campaignId
The campaign identifier
setCustomerId (String customerId )
→ Future <void >
This method sends the customerId without using an event.
setDeepLinkHandler (DeepLinkHandler deepLinkHandler )
→ void
setPermissionStatusHandler (PermissionStatusHandler handler )
→ void
setReceivedNativeAdsHandler (ReceivedNativeAdsHandler handler )
→ void
startOrder (EmmaOrder order )
→ Future <void >
This method starts the order and save it.
startPushSystem (String notificationIcon , {String ? notificationChannel , String ? notificationChannelId })
→ Future <void >
Init EMMA Push system
You must define notificationIcon
for Android OS
Optional param notificationChannel
to define notification channel name for Android OS. Default app name.
Optional param notificationChannelId
to subscribe an existent channel.
startSession (String sessionKey , {bool debugEnabled = true })
→ Future <void >
Starts EMMA Session with a sessionKey
.
toString ()
→ String
A string representation of this object.
inherited
trackEvent (String eventToken , {Map <String , String > ? eventAttributes })
→ Future <void >
Send an event to emma identified by eventToken
.
You can also assign some attributtes to this event with eventArguments
You can complete user profile with extra parameters
trackOrder ()
→ Future <void >
This method commits the order and send to server.
trackUserLocation ()
→ Future <void >
This method allows track location