> For the complete documentation index, see [llms.txt](https://purchasely.gitbook.io/purchasely/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://purchasely.gitbook.io/purchasely/quick-start-1/sdk-installation/flutter-sdk.md).

# Flutter SDK

## Installation

### **Flutter Pub.Dev**

You can use [pub.dev](https://pub.dev/packages/purchasely_flutter/install) to install **Purchasely** by running this command in your project:

```bash
flutter pub add purchasely_flutter
```

### Android Integration

#### Google Play Billing

Google is not provided by default as you have a choice on Android\
To add Google as a store, you can use our flutter plugin

```bash
flutter pub add purchasely_google
```

{% hint style="warning" %}
This dependency version **must always match** purchasely\_flutter version\
Be very careful to always update both at the same time
{% endhint %}

#### Video Player

On Android devices we use [Google Exoplayer](https://github.com/google/ExoPlayer) to display videos but you may be also using a video sdk in your project that will have a dependency conflict with our version of Exoplayer. To avoid this, we do not provide a video player for Android in our core dependency.\
\
If you are concerned about a potential conflict, please refer to this [article](https://help.purchasely.io/en/articles/5963004-displaying-a-video-on-android-devices)\
If you are not concerned about such conflict, the simplest way to display videos on paywalls is to use our plugin

```bash
flutter pub add purchasely_android_player
```

#### Other Stores dependencies

Our Flutter SDK does not contains other stores to avoid unnecessary integrations. You have to specifically declare which stores you want. To add our stores dependencies to your project, you just need to add them to the `app/build.gradle` file of your android folder in your project.

{% tabs %}
{% tab title="build.gradle" %}

```bash
dependencies {
    //Amazon App Store
    implementation 'io.purchasely:amazon:3.7.2'
    
    //Huawei Mobile Services
    implementation 'io.purchasely:huawei-services:3.7.2'
}
```

{% endtab %}
{% endtabs %}

#### Huawei Integration

Huawei needs a little more configuration to work properly, to integrate Huawei Mobile Services, please refer to our Android documentation : <https://docs.purchasely.com/quick-start/sdk-installation/quick-start#huawei-mobile-services>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://purchasely.gitbook.io/purchasely/quick-start-1/sdk-installation/flutter-sdk.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
