MoEngageFlutter class

Helper Class to interact with MoEngage SDK

Constructors

MoEngageFlutter.new(String appId, {MoEInitConfig? moEInitConfig})
MoEngageFlutter Constructor

Properties

appId String
MoEngage App ID
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

configureLogs(LogLevel logLevel, {bool isEnabledForReleaseBuild = false}) → void
Configure MoEngage SDK Logs logLevel - LogLevel for SDK logs isEnabledForReleaseBuild If true, logs will be printed for the Release build. By default the logs are disabled for the Release build.
deleteUser() Future<UserDeletionData>
Delete Current User Data From MoEngage Server Note: This API is only applicable for Android Platform @returns - Instance of Future of type UserDeletionData @since 6.1.0
disableAdIdTracking() → void
API to disable Advertising Id tracking. By default Advertising Id tracking is disabled, call this method only if you have enabled Advertising Id tracking at some point Note: This API is only for Android Platform.
disableAndroidIdTracking() → void
API to enable Android-id tracking. By default Android-id tracking is disabled, call this method only if you have called enableAndroidIdTracking at some point. Note: This API is only for Android Platform.
disableDataTracking() → void
Optionally opt-out of data tracking. When data tracking is opted-out no event or user attribute is tracked on MoEngage Platform.
disableDeviceIdTracking() → void
Disables Device-id tracking Note: This API is only for Android Platform
disableSdk() → void
API to disable all features of the SDK.
enableAdIdTracking() → void
API to enable Advertising Id tracking Note: This API is only for Android Platform.
enableAndroidIdTracking() → void
API to enable Android-id tracking Note: This API is only for Android Platform.
enableDataTracking() → void
Optionally opt-in data tracking. Note: By default data tracking is enabled, this API should be called only if you have called disableDataTracking at some point.
enableDeviceIdTracking() → void
Enable Device-id tracking. It is enabled by default, and should be called only if tracking is disabled at some point. Note: This API is only for Android Platform
enableSdk() → void
API to enable SDK usage. Note: By default the SDK is enabled, should only be called if you have called disableSdk at some point.
getSelfHandledInApp() → void
Try to return a self handled in-app to the callback listener. Ensure self handled in-app listener is set using setSelfHandledInAppHandler before you call this API
getSelfHandledInApps() Future<SelfHandledCampaignsData>
Get Multiple Self Handled InApps @returns - Instance of Future of type SelfHandledCampaignsData @since 8.1.0
getUserIdentities() Future<Map<String, String>?>
Return Identities of the user that has been set. @since 9.2.0
identifyUser(dynamic identity) → void
Identify the user with the given identity. Supported types: String and Map<String, String> @since 9.2.0
initialise() → void
Initialize MoEngage SDK
logout() → void
Invalidates the existing user and session. A new user and session is created.
Navigates the user to the Notification settings on Android 8 or above, on older versions the user is navigated the application settings or application info screen. Note: This API is only for Android Platform.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onOrientationChanged() → void
To be called when Orientation of the App Is Changed Note: This API is only for Android Platform.
passFCMPushPayload(Map<String, dynamic> payload) → void
Pass FCM Push Payload to the MoEngage SDK. Note: This API is only for Android Platform. payload - FCM Push Payload Data
passFCMPushToken(String pushToken) → void
Pass FCM Push Token to the MoEngage SDK. Note: This API is only for Android Platform. pushToken - FCM Push Token
passPushKitPushToken(String pushToken) → void
Pass Push Kit Token to the MoEngage SDK. Note: This API is only for Android Platform. pushToken - Push Kit Token
pushPermissionResponseAndroid(bool isGranted) → void
Notify the SDK on notification permission granted state to the application true if granted, else false Note: This API is only for Android Platform. isGranted - Push Permission Granted Flag
registerForProvisionalPush() → void
Register for Provisional Push Notification Note: This API is only for iOS Platform. @since 8.1.0
registerForPushNotification() → void
Push Notification Registration Note: This API is only for iOS Platform.
requestPushPermissionAndroid() → void
Requests the push permission on Android 13 and above. Note: This API is only for Android Platform.
resetCurrentContext() → void
Reset Current Context for InApps
selfHandledClicked(SelfHandledCampaignData data) → void
Mark self-handled campaign as clicked. API to be called only when in-app is self handled data - Instance of SelfHandledCampaignData
selfHandledDismissed(SelfHandledCampaignData data) → void
Mark self-handled campaign as dismissed. API to be called only when in-app is self handled data - Instance of SelfHandledCampaignData
selfHandledShown(SelfHandledCampaignData data) → void
Mark self-handled campaign as shown. API to be called only when in-app is self handled data - Instance of SelfHandledCampaignData
setAlias(String newUniqueId) → void
Update user's unique id which was previously set by setUniqueId(). newUniqueId - Unique Identifier of type String
setAppStatus(MoEAppStatus appStatus) → void
This API tells the SDK whether it is a fresh install or an existing application was updated. appStatus - Instance of MoEAppStatus
setBirthDate(String birthDate) → void
Set user's birth-date. Birthdate should be sent in the following format - yyyy-MM-dd'T'HH:mm:ss.fff'Z' birthDate - ISO Formatted Date String
setCurrentContext(List<String> contexts) → void
Set the current context for the given user for InApps contexts - List of Context
setEmail(String emailId) → void
Tracks user's email-id as a user attribute. emailId - Email Id of the User
setFirstName(String firstName) → void
Tracks first name as a user attribute. firstName First Name of user passed by user
setGender(MoEGender gender) → void
Tracks gender as a user attribute. gender - Instance of MoEGender
setInAppClickHandler(InAppClickCallbackHandler? handler) → void
Sets InApp Click Callback Listener handler - Callback of type InAppClickCallbackHandler
setInAppDismissedCallbackHandler(InAppDismissedCallbackHandler? handler) → void
Sets InApp Dismiss Callback Handler handler - Callback of type InAppDismissedCallbackHandler
setInAppShownCallbackHandler(InAppShownCallbackHandler? handler) → void
Sets InApp Shown Callback Handler handler - Callback of type InAppShownCallbackHandler
setLastName(String lastName) → void
Tracks last name as a user attribute. lastName - Last Name of the User
setLocation(MoEGeoLocation location) → void
Set's user's location location - Instance of MoEGeoLocation
setPermissionCallbackHandler(PermissionResultCallbackHandler? handler) → void
Setup a callback handler for getting the response permission handler - Instance of PermissionResultCallbackHandler
setPhoneNumber(String phoneNumber) → void
Tracks phone number as a user attribute. phoneNumber - Phone Number of the User
setPushClickCallbackHandler(PushClickCallbackHandler? handler) → void
Sets Push Click Callback Handler handler - Callback of type PushClickCallbackHandler
setPushTokenCallbackHandler(PushTokenCallbackHandler? handler) → void
Sets Push Token Available Callback Handler handler - Callback of type PushTokenCallbackHandler
setSelfHandledInAppHandler(SelfHandledInAppCallbackHandler? handler) → void
Sets Self Handled Callback Available Handler handler - Callback of type SelfHandledInAppCallbackHandler
setUniqueId(String uniqueId) → void
Set a unique identifier for a user.
uniqueId - Unique Identifier of type String
setupNotificationChannelsAndroid() → void
API to create notification channels on Android. Note: This API is only for Android Platform.
setUserAttribute(String userAttributeName, dynamic userAttributeValue) → void
Tracks a user attribute. Supported attribute types:
setUserAttributeIsoDate(String userAttributeName, String isoDateString) → void
Tracks the given time as user-attribute.
Date should be passed in the following format - yyyy-MM-dd'T'HH:mm:ss.fff'Z' userAttributeName - Name of User Attribute isoDateString - ISO Formatted Date String
setUserAttributeLocation(String userAttributeName, MoEGeoLocation location) → void
Tracks the given location as user attribute. userAttributeName - Name of User Attribute location - Instance of MoEGeoLocation
setUserName(String userName) → void
Tracks user-name as a user attribute. userName Full Name value passed by user
showInApp() → void
Try to show an InApp Message.
showNudge({MoEngageNudgePosition position = MoEngageNudgePosition.any}) → void
Show Non-Intrusive Nudge InApp position - MoEngageNudgePosition Position in which Nudge InApp should be displayed. If position is not passed, it will take default position MoEngageNudgePosition.any Note: This API is available for Android/iOS platforms. Not supported in Web Platform @since 7.0.0
toString() String
A string representation of this object.
inherited
trackEvent(String eventName, [MoEProperties? eventAttributes]) → void
Tracks an event with the given attributes. eventName - Name of the Event to be tracked eventAttributes - Instance of MoEProperties
updatePushPermissionRequestCountAndroid(int requestCount) → void
Updates the number of the times Notification permission is requested Note: This API is only applicable for Android Platform. This should not called in App/Widget lifecycle methods. requestCount This count will be incremented to existing value

Operators

operator ==(Object other) bool
The equality operator.
inherited