Flutter Advanced Features

Learn more about advanced features such as Product Config, Feature Flags, Native Display, and more.

Advanced Features


During development, we recommend that you set the SDK to DEBUG mode, in order to log warnings or other important messages to the iOS logging system. This can be done by setting the debug level.

Set Debug Level

Debug level can be one of the following:

  • -1: Disables all debugging. You can set the debugLevel to -1 if you want to disable CleverTap logs for the production environment.
  • 0 : Default, shows minimal SDK integration related logging.
  • 2 : Shows debug output.
  • 3 : Shows verbose output.



To get the SDK logs in the killed state, add platform-specific debugging.

Push Notifications

Registering FCM, Baidu, Xiaomi, or Huawei Token

CleverTap supports integration with various 3rd party push providers for Android platform

  • To enable automatic integration with Various providers via CleverTap , integrate the associated clevertap service in Android module of your code by following the Android push guide
  • To enable manual integration with various 3rd party push providers, You can integrate them via their associated implementation guides and use the Flutter plugin's built in methods to send Push token to CT server:

Create Notification


Custom Handling for Pull Notifications

Process Push Notification


Native Display

Native Display helps to display content natively within your app without interrupting the user. It also provides the ability to change the content of your app dynamically and deliver relevant and contextual content to your users.

On Display Units Loaded Callback


void onDisplayUnitsLoaded(List<dynamic>? displayUnits) {
    this.setState(() {
      print("Display Units = " + displayUnits.toString());

Get All Display Units

void getAdUnits() {
    this.setState(() async {
      List? displayUnits = await CleverTapPlugin.getAllDisplayUnits();
      print("Display Units Payload = " + displayUnits.toString());

      displayUnits?.forEach((element) {
        var customExtras = element["custom_kv"];
        if (customExtras != null) {
           print("Display Units CustomExtras: " +  customExtras.toString());

Display unit viewed event for ID


Display unit clicked event for ID


Product Config

With Product Experiences, you can change the behavior and appearance of your app remotely without an update. This helps you to deliver in-app personalization experience to your app users and test their response. You can use product config to modify app behaviour and feature flags to add or remove features from your app without performing an app store deployment.

Set Product Configuration to default

You can set in-app default parameter values in the Product Config object so that your app behaves as intended before values are fetched from CleverTap, and so that default values are available if none are set on the dashboard.

void productConfigInitialized() {
    print("Product Config Initialized");
    this.setState(() async {
      await CleverTapPlugin.fetch();

Fetch and activate values

To fetch parameter values from CleverTap, call the fetch() method. Any values that you set on the dashboard are fetched and stored in the Product Config object.
To make fetched parameter values available to your app, call the activate() method.

For cases where you want to fetch and activate values in one call, you can use a fetchAndActivate()request to fetch values from CleverTap and make them available to the app:

Fetching product configs

By default, the fetch calls are throttled, which is controlled from the CleverTap servers as well as SDK. To know more see the Throttling section. The default value for minimum fetch interval is set at 60*10 by default from CleverTap.

void fetch() {
    // CleverTapPlugin.fetchWithMinimumIntervalInSeconds(60*10);

Activate the most recently fetched product config

void activate() {

Fetch And Activate product config

void fetchAndActivate() {

Fetch Minimum Time Interval


Get Boolean key


Get String key


Get Long key


Get Double key


Get last fetched timestamp in milliseconds


Feature Flag

Feature flags let you toggle a feature on and off controlled via CleverTap Backend.

Get Feature Flag

Feature flags are automatically fetched every time a new app session is created. Once the flags are fetched you can get it via the getters.

void featureFlagsUpdated() {
    this.setState(() async {
      bool booleanVar = await CleverTapPlugin.getFeatureFlag("BoolKey", false);

App Personalization

Enable Personalization


Disable Personalization



Push Install Referrer

CleverTapPlugin.pushInstallReferrer("source", "medium", "campaign");


Set Opt Out

CleverTapPlugin.setOptOut(false); ///Will opt in the user to send data to CleverTap
CleverTapPlugin.setOptOut(true); ///Will opt out the user to send data to CleverTap

Enable Device Networking Info Reporting

// Will opt out the user to send Device Network data to CleverTap
// Will opt in the user to send Device Network data to CleverTap

Set Offline

// Will set the user online
// Will set the user offline

What’s Next