CleverTapPlugin class

Constructors

CleverTapPlugin()
factory

Properties

cleverTapDisplayUnitsLoadedHandler ↔ CleverTapDisplayUnitsLoadedHandler
getter/setter pair
cleverTapFeatureFlagUpdatedHandler ↔ CleverTapFeatureFlagUpdatedHandler
getter/setter pair
cleverTapInAppNotificationButtonClickedHandler ↔ CleverTapInAppNotificationButtonClickedHandler
getter/setter pair
cleverTapInAppNotificationDismissedHandler ↔ CleverTapInAppNotificationDismissedHandler
getter/setter pair
cleverTapInAppNotificationShowHandler ↔ CleverTapInAppNotificationShowHandler
getter/setter pair
cleverTapInboxDidInitializeHandler ↔ CleverTapInboxDidInitializeHandler
getter/setter pair
cleverTapInboxMessagesDidUpdateHandler ↔ CleverTapInboxMessagesDidUpdateHandler
getter/setter pair
cleverTapInboxNotificationButtonClickedHandler ↔ CleverTapInboxNotificationButtonClickedHandler
getter/setter pair
cleverTapInboxNotificationMessageClickedHandler ↔ CleverTapInboxNotificationMessageClickedHandler
getter/setter pair
cleverTapProductConfigActivatedHandler ↔ CleverTapProductConfigActivatedHandler
getter/setter pair
cleverTapProductConfigFetchedHandler ↔ CleverTapProductConfigFetchedHandler
getter/setter pair
cleverTapProductConfigInitializedHandler ↔ CleverTapProductConfigInitializedHandler
getter/setter pair
cleverTapProfileDidInitializeHandler ↔ CleverTapProfileDidInitializeHandler
getter/setter pair
cleverTapProfileSyncHandler ↔ CleverTapProfileSyncHandler
getter/setter pair
cleverTapPushAmpPayloadReceivedHandler ↔ CleverTapPushAmpPayloadReceivedHandler
getter/setter pair
cleverTapPushClickedPayloadReceivedHandler ↔ CleverTapPushClickedPayloadReceivedHandler
getter/setter pair
cleverTapPushPermissionResponseReceivedHandler ↔ CleverTapPushPermissionResponseReceivedHandler
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

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setCleverTapDisplayUnitsLoadedHandler(CleverTapDisplayUnitsLoadedHandler handler) → void
Define a method to handle Native Display Unit updates
setCleverTapFeatureFlagUpdatedHandler(CleverTapFeatureFlagUpdatedHandler handler) → void
Define a method to handle Feature Flag updates
setCleverTapInAppNotificationButtonClickedHandler(CleverTapInAppNotificationButtonClickedHandler handler) → void
Define a method to handle inApp notification button clicked
setCleverTapInAppNotificationDismissedHandler(CleverTapInAppNotificationDismissedHandler handler) → void
Define a method to handle inApp notification dismissed
setCleverTapInAppNotificationShowHandler(CleverTapInAppNotificationShowHandler handler) → void
Only for Android - Define a method to handle inApp notification shown
setCleverTapInboxDidInitializeHandler(CleverTapInboxDidInitializeHandler handler) → void
Define a method to handle inbox initialization
setCleverTapInboxMessagesDidUpdateHandler(CleverTapInboxMessagesDidUpdateHandler handler) → void
Define a method to handle inbox update
setCleverTapInboxNotificationButtonClickedHandler(CleverTapInboxNotificationButtonClickedHandler handler) → void
Define a method to handle inbox notification button clicked
setCleverTapInboxNotificationMessageClickedHandler(CleverTapInboxNotificationMessageClickedHandler handler) → void
Define a method to handle inbox notification message clicked
setCleverTapProductConfigActivatedHandler(CleverTapProductConfigActivatedHandler handler) → void
Define a method to handle Product config activation updates
setCleverTapProductConfigFetchedHandler(CleverTapProductConfigFetchedHandler handler) → void
Define a method to handle Product config fetch updates
setCleverTapProductConfigInitializedHandler(CleverTapProductConfigInitializedHandler handler) → void
Define a method to handle Product config initialization
setCleverTapProfileDidInitializeHandler(CleverTapProfileDidInitializeHandler handler) → void
Define a method to handle profile initialization
setCleverTapProfileSyncHandler(CleverTapProfileSyncHandler handler) → void
Define a method to handle profile sync
setCleverTapPushAmpPayloadReceivedHandler(CleverTapPushAmpPayloadReceivedHandler handler) → void
Define a method to handle Push Amplification payload
setCleverTapPushClickedPayloadReceivedHandler(CleverTapPushClickedPayloadReceivedHandler handler) → void
Define a method to handle Push Clicked payload
setCleverTapPushPermissionResponseReceivedHandler(CleverTapPushPermissionResponseReceivedHandler handler) → void
Define a method to handle Push permission response
toString() String
A string representation of this object.
inherited

Operators

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

Static Properties

cleverTapOnValueChangedHandlers List<CleverTapOnValueChangedHandler>
getter/setter pair
cleverTapOnVariablesChangedHandlers List<CleverTapOnVariablesChangedHandler>
getter/setter pair

Static Methods

activate() Future<void>
Activates the most recently fetched Product configs
clearInAppResources(bool expiredOnly) Future<void>
createNotification(dynamic data) Future<void>
Method to create Notification using CleverTap
createNotificationChannel(String channelId, String channelName, String channelDescription, int importance, bool showBadge) Future<void>
Method to create Notification Channel
createNotificationChannelGroup(String groupId, String groupName) Future<void>
Method to create Notification Channel Group
createNotificationChannelWithGroupId(String channelId, String channelName, String channelDescription, int importance, String groupId, bool showBadge) Future<void>
Method to create Notification Channel with Group
createNotificationChannelWithGroupIdAndSound(String channelId, String channelName, String channelDescription, int importance, String groupId, bool showBadge, String sound) Future<void>
Method to create Notification Channel with Group and Sound
createNotificationChannelWithSound(String channelId, String channelName, String channelDescription, int importance, bool showBadge, String sound) Future<void>
Method to create Notification Channel With Sound
defineVariables(Map<String, dynamic> variables) Future<void>
Create variables.
deleteInboxMessageForId(String messageId) Future<void>
Deletes the CTInboxMessage object for given messageId
deleteInboxMessagesForIds(List<String> messageIds) Future<void>
Deletes the CTInboxMessage objects for given messageIds
deleteNotificationChannel(String channelId) Future<void>
Method to delete Notification Channel
deleteNotificationChannelGroup(String groupId) Future<void>
Method to delete Notification Channel Group
disablePersonalization() Future<void>
Disables the Profile/Events Read and Synchronization API
discardInAppNotifications() Future<void>
Suspends the display of InApp Notifications and discards any new InApp Notifications to be shown after this method is called. The InApp Notifications will be displayed only once resumeInAppNotifications() is called.
dismissInbox() Future<void>
Dismisses the App Inbox screen
enableDeviceNetworkInfoReporting(bool value) Future<void>
Enables Device & Networking Information Reporting to CleverTap
enablePersonalization() Future<void>
Enables the Profile/Events Read and Synchronization API
enableWebPush(Map<String, dynamic> pushData) Future<void>
Only for Web - Render notification viewed
eventGetDetail(String eventName) Future<Map<String, dynamic>>
Returns a Map object for the particular event passed. EventDetail consists of event name, count, first time
eventGetFirstTime(String eventName) Future
Returns the timestamp of the first time the given event was raised
eventGetLastTime(String eventName) Future
Returns the timestamp of the last time the given event was raised
eventGetOccurrences(String eventName) Future<int?>
Returns the total count of the specified event
fetch() Future<void>
Fetches the Product Configs from CleverTap
fetchAndActivate() Future<void>
Fetches and then activates the fetched Product configs.
fetchInApps() Future<bool?>
Fetch Client Side In-Apps
fetchVariables() Future<bool?>
Forces variables to update from the server.
fetchWithMinimumIntervalInSeconds(int interval) Future<void>
Fetches Product configs, adhering to the specified minimum fetch interval in seconds.
getAccountID() Future<String?>
Only for Web - Return the accountId
getAllDisplayUnits() Future<List?>
Display units Returns a List of Display units as a Map
getAllInboxMessages() Future<List?>
Returns a list of json string representation of all CTInboxMessage
getAppLaunchNotification() Future<CleverTapAppLaunchNotification>
getCleverTapDate(DateTime dateTime) String
getCleverTapID() Future<String?>
Returns a unique identifier through callback by which CleverTap identifies this user
getDisplayUnitForId(String unitId) Future<Map<String, dynamic>>
Returns Display unit info as a Map
getEventHistory(String eventName) Future<Map<String, dynamic>>
Returns a Map of event names and corresponding event details of all the events raised
getFeatureFlag(String key, bool defaultValue) Future<bool?>
Returns boolean value of Feature Flag
getInboxMessageCount() Future<int?>
Returns the count of all inbox messages for the user
getInboxMessageForId(String messageId) Future<Map<String, dynamic>>
Returns a json string representation of CTInboxMessage for given messageId
getInboxMessageUnreadCount() Future<int?>
Returns the count of total number of unread inbox messages for the user
getInitialUrl() Future<String?>
only iOS - If an application is launched from a push notification click, returns the CleverTap deep link included in the push notification
getLastFetchTimeStampInMillis() Future<int?>
Returns the last fetched timestamp in millis.
getProductConfigBoolean(String key) Future<bool?>
Returns the parameter value for the given key as a boolean.
getProductConfigDouble(String key) Future<double?>
Returns the parameter value for the given key as a double.
getProductConfigLong(String key) Future<int?>
Returns the parameter value for the given key as a long (int for Dart).
getProductConfigString(String key) Future<String?>
Returns the parameter value for the given key as a String.
getPushNotificationPermissionStatus() Future<bool?>
Returns true if push permission is enabled.
getUnreadInboxMessages() Future<List?>
Returns a list of json string representation of unread CTInboxMessage
getVariable(String name) Future
Get a variable or a group for the specified name.
getVariables() Future<Map<Object?, Object?>>
Get all variables via a JSON object.
init(String accountId, [String? region, String? targetDomain, String? token]) Future<void>
Only for Web - Initialize clevertap sdk
initializeInbox() Future<void>
Initializes the inbox controller and sends a callback
markReadAllInboxMessage() Future<void>
Only for Web - Mark all messages as read
markReadInboxMessageForId(String messageId) Future<void>
Marks the given messageId of CTInboxMessage object as read
markReadInboxMessagesForIds(List<String> messageIds) Future<void>
Marks the given messageIds of CTInboxMessage objects as read
onKilledStateNotificationClicked(CleverTapOnKilledStateNotificationClickedHandler handler) → void
Set a message handler function which is called when the app is in the terminated or killed state.
onUserLogin(Map<String, dynamic> profile) Future<void>
Creates a separate and distinct user profile identified by one or more of Identity, Email, FBID or GPID values, and populated with the key-values included in the profile map argument.
onValueChanged(String name, CleverTapOnValueChangedHandler handler) → void
onVariablesChanged(CleverTapOnVariablesChangedHandler handler) → void
processPushNotification(dynamic data) Future<void>
Method to process Notification using CleverTap to avoid duplicates using Push Amplification
profileAddMultiValue(String key, String value) Future<void>
Add a unique value to a multi-value user profile property If the property does not exist it will be created
profileAddMultiValues(String key, List values) Future<void>
Add a collection of unique values to a multi-value user profile property If the property does not exist it will be created
profileDecrementValue(String key, num value) Future<void>
Decrement given num value. The value should be in positive range
profileGetCleverTapAttributionIdentifier() Future<String?>
Returns a unique CleverTap identifier suitable for use with install attribution providers.
profileGetCleverTapID() Future<String?>
Returns a unique identifier by which CleverTap identifies this user.
profileIncrementValue(String key, num value) Future<void>
Increment given num value. The value should be in positive range
profileRemoveMultiValue(String key, String value) Future<void>
Remove a unique value from a multi-value user profile property
profileRemoveMultiValues(String key, List values) Future<void>
Remove a collection of unique values from a multi-value user profile property
profileRemoveValueForKey(String key) Future<void>
Remove the user profile property value specified by key from the user profile
profileSet(Map<String, dynamic> profile) Future<void>
Push a profile update.
profileSetMultiValues(String key, List values) Future<void>
Set a collection of unique values as a multi-value user profile property, any existing value will be overwritten. Max 100 values, on reaching 100 cap, oldest value(s) will be removed. Values must be Strings and are limited to 512 characters.
promptForPushNotification(bool fallbackToSettings) Future<void>
Directly calls OS hard dialog for requesting push permission.
promptPushPrimer(Map<String, dynamic> pushPrimerJSON) Future<void>
Creates a push primer asking user to enable push notification.
pushDisplayUnitClickedEvent(String unitId) Future<void>
Raise Notification Clicked for Display Unit id passed
pushDisplayUnitViewedEvent(String unitId) Future<void>
Raise Notification Viewed for Display Unit id passed
pushInboxNotificationClickedEventForId(String messageId) Future<void>
Pushes the Notification Clicked event for App Inbox to CleverTap.
pushInboxNotificationViewedEventForId(String messageId) Future<void>
Pushes the Notification Viewed event for App Inbox to CleverTap.
pushInstallReferrer(String source, String medium, String campaign) Future<void>
This method is used to push install referrer via UTM source, medium & campaign parameters
pushNotificationClickedEvent(Map<String, dynamic> extras) Future<void>
Record Notification Clicked event
pushNotificationViewedEvent(Map<String, dynamic> extras) Future<void>
Record Notification Viewed event
recordChargedEvent(Map<String, dynamic> chargeDetails, List<Map<String, dynamic>> items) Future<void>
**
recordEvent(String eventName, Map<String, dynamic> properties) Future<void>
Pushes a basic event.
recordScreenView(String screenName) Future<void>
Record a Screen View event
registerForPush() Future<void>
Only for iOS - Registers the application to receive push notifications
renderNotificationClicked(Map<String, dynamic> clickedData) Future<void>
Only for Web - Render notification viewed
renderNotificationViewed(Map<String, dynamic> viewedData) Future<void>
Only for Web - Render notification viewed
resetProductConfig() Future<void>
Deletes all activated, fetched and defaults configs as well as all Product Config settings.
resumeInAppNotifications() Future<void>
Resumes display of InApp Notifications. If suspendInAppNotifications() was called previously, calling this method will instantly show all queued InApp Notifications and also resume InApp Notifications on events raised after this method is called. If discardInAppNotifications() was called previously, calling this method will only resume InApp Notifications on events raised after this method is called.
sessionGetPreviousVisitTime() Future
Returns the timestamp of the previous visit
sessionGetScreenCount() Future<int?>
Returns the number of screens which have been displayed by the app
sessionGetTimeElapsed() Future
Returns the time elapsed by the user on the app
sessionGetTotalVisits() Future<int?>
Returns the total number of times the app has been launched
sessionGetUTMDetails() Future<Map<String, dynamic>>
Returns a Map of UTMDetail object which consists of UTM parameters like source, medium & campaign
setBaiduPushToken(String value) Future<void>
Set the Baidu Token for Push Notifications
setDebugLevel(int value) Future<void>
Sets debug level to show logs on Android Studio/Xcode console
setDefaultsMap(Map<String, dynamic> defaults) Future<void>
Sets Default Values for Product Config using the passed Map
setHuaweiPushToken(String value) Future<void>
Set the Huawei Token for Push Notifications
setLocale(Locale locale) Future<void>
Sets the user locale.
setLocation(double latitude, double longitude) Future<void>
Set the user profile location in CleverTap
setMinimumFetchIntervalInSeconds(int interval) Future<void>
Sets the minimum interval between successive fetch calls.
setOffline(bool value) Future<void>
Sets the CleverTap SDK to offline
setOptOut(bool value) Future<void>
Method to allow user to Opt out of sending data to CleverTap as per GDPR rules
setPushToken(String value) Future<void>
Set the FCM Token for Push Notifications
setUseIP(bool value) Future<void>
Only for Web - Method to ensure that clevertap does not auto collect the device IP as per GDPR rules
showInbox(Map<String, dynamic> styleConfig) Future<void>
Opens CTInboxActivity to display Inbox Messages
suspendInAppNotifications() Future<void>
In-App Controls Suspends display of InApp Notifications. The InApp Notifications are queued once this method is called and will be displayed once resumeInAppNotifications() is called.
syncVariables() Future<void>
Uploads variables to the server. Requires Development/Debug build/configuration.
syncVariablesinProd(bool isProduction) Future<void>
Uploads variables to the server.
toggleInbox(Object rect) Future<void>
unregisterPushPermissionNotificationResponseListener() Future<void>
Only for Android - Unregisters PushPermissionNotificationResponseListener

Constants

libName → const String
libVersion → const int