---
updatedAt: 2025-10-30T22:11:57.000Z
agentTools:
  projectIndex: https://developer-ecom.superagi.com/llms.txt
---

# SDK Integration

This page will guide you to integrate and verify Contlo SDK in your Flutter application.

## Prerequisites

To start the SDK integration, you must first create an **API key** and install the **Mobile Push** app from the Contlo App market. Go to your Contlo Dashboard and follow the steps below:

### Create an API key

1. Go to your profile section at the top right corner and click **Settings**.
2. Go to **Accounts > Store Settings** from the sidebar on the Settings homepage.
3. Go to the **API keys** tab on the Store Settings page and click **Create key** on the **Private API keys** section.

<Image align="center" width="80% " src="https://files.readme.io/6954043-Screenshot_2024-01-03_at_4.42.28_PM.png" />

4. Copy the newly created API key to add it later during the SDK integration.

### Install Mobile push

1. Go to **App Market** from the sidebar and search **Mobile Push**.
2. Click **Install**.

<Image align="center" width="80% " src="https://files.readme.io/7883783-Screenshot_2024-01-03_at_4.41.15_PM.png" />

## Installation

To install the Contlo SDK in your Flutter project, follow the steps below:

1. In your Flutter project, open the **pubspec.yaml** file and add the `contlo_plugin` under `dependencies`:

```yaml
dependencies:
  contlo_plugin: ^1.0.0
```

2. To fetch the Contlo package, save the changes made on pubspec.yaml file and run the follwing command in the terminal:

```shell
flutter pub get
```

3. To use the Contlo SDK in your Flutter project, import the SDK in the respective dart file.

```java Dart
import 'package:contlo_plugin/contlo_plugin.dart';
```

> 📘
>
> Every method within the Contlo SDK is asynchronous, that means you must invoke them using the **async** and **await** keyword.

## Initialization

Once the installation is complete, follow the steps below to initialize the Contlo SDK:

1. Open the file that represents the start of the application (eg. `main.dart`) and import the Contlo package.

```javascript Dart
import 'package:contlo_plugin/contlo_plugin.dart';
```

2. Add the Contlo's `init()` method after the your App's **runApp()** method.
   1. Pass the API key (created from the Contlo dashboard) as the parameter in the `init()` method.

```javascript Dart
void main() {
runApp (const MyApp ()) ;

ContloPlugin.init("<Your API KEY>");
}
```

## Verify Integration:

After initializing the SDK, open your application on a device or emulator.

Go to the **Audiences** section on your Contlo dashboard. You would see a new anonymous user is created.

<Image align="center" src="https://files.readme.io/46dc0fb-Screenshot_2023-09-28_132841.png" />

You have successfully integrated the Contlo Flutter SDK.

**Welcome aboard!**