The Thunderhead ONE SDK Flutter Plugin for iOS and Android.


To see integration examples, see examples.


To install the Thunderhead ONE Flutter Plugin, go to your pubspec.yaml and add the dependency:


Disable automatic Interaction detection

By disabling automatic Interaction detection, the SDK will no longer automatically send Interaction requests as native iOS View Controllers or Android Activities or Fragments are presented on screen.

It is recommended to disable automatic Interaction detection in Flutter applications as the SDK does not recognize Flutter or web view elements, so it becomes your responsibility to send them when needed by using the send Interaction methods outlined below.

For native applications where only a part of the app uses Flutter, you may want to ignore disabling automatic Interaction detection to automatically detect native Interactions.

You can disable automatic Interaction detection by calling the method disableAutomaticInteractionDetection: and passing true as a parameter, as shown below:

// Swift
// Kotlin
oneConfigureCodelessInteractionTracking {
    // disables Fragment/Activity Interaction Tracking
    disableCodelessInteractionTracking = true 

An appropriate place to call the method might be under didFinishLaunchingWithOptions in your AppDelegate for iOS or under onCreate in your Application class for Android.

You can set this back to false at any point to restart automatic Interaction detection.



To initialize the ONE Flutter Plugin, call the following method:

import 'package:one_sdk_flutter/one_sdk_flutter.dart';

  • See example of usage here

Send an Interaction

To send an Interaction request without properties, call the following method:

  • See example of usage here

To send an Interaction request with properties, call the following method:

One.sendInteraction("/interactionPath", { 'key' : 'value' });
  • See example of usage here

To send an Interaction request and retrieve the response, call the following method:

One.sendInteraction("/interactionPath").then((response) {
    print('Interaction response tid = ${response[oneResponseTidKey]}');
    print('Interaction response Interaction path = ${response[oneResponseInteractionPathKey]}');
    print('Interaction response optimization points = ${response[oneResponseOptimizationPointsKey]}');
  • See example of usage here

Send a response code

To send a response code, call the following method:

One.sendResponseCode("code", "/interactionPath");

Opt an end-user out of tracking

To opt an end-user out of all tracking options, when the end-user does not give permission to be tracked in the client app, call the following method:

// Opts out of all tracking options.  

To opt back in, call the following method:

// Opt in for all tracking options.

Opt an end user out of city country level tracking

To opt an end-user out of city/country level tracking, call the following method:

// Calling this method will opt the end-user back in for all tracking. 

Opt an end user out of keychain Tid storage (iOS only)

To opt an end-user out of all keychain Tid storage, call the following method:


Access debug information

To configure logging, call the following method:

  • See example of usage here

Questions or need help

Thunderhead ONE Support

The Thunderhead team is available 24/7 to answer any questions you have. Just email or visit our docs page for more detailed installation and usage information.

Salesforce Interaction Studio Support

For Salesforce Marketing Cloud Interaction Studio questions, please submit a support ticket via