> For the complete documentation index, see [llms.txt](https://docs.thryve.health/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.thryve.health/integrate-your-mobile-app/setup-thryve-sdk/flutter.md).

# Flutter

The Flutter wrapper for the native SDKs supports all functionalities of the native SDKs unless stated differently.

{% hint style="info" %}
Starting from version 5.2.0, the Thryve Flutter SDK, supports integration via the [new Samsung Health Data for Android](https://developer.samsung.com/health/data/overview.html) exclusively. Read more on the [Thryve Samsung Health module](/thryve-data-sources/samsung-health.md)
{% endhint %}

## Configuration of  projects

The Flutter SDK supports the development of iOS and Android applications.  Follow the guide below to configure your project.<br>

* Create a directory, `plugin` inside the project's root directory
* Copy the [Thryve Flutter SDK plugins](https://git.thryve.de/thryve/flutter/-/tree/main/plugin) (applicable to your project) into the newly created `plugin` directory of the project.
* In your project's `pubspec.yaml`, ensure the `environment` `sdk` property is `>=3.1.0 <4.0.0`&#x20;
* In your project's `pubspec.yaml`, add the Thryve Flutter SDK dependencies applicable to your project in the `dependencies:` block

{% hint style="danger" %}
Starting with version 5.2.0, the Samsung Health plugin in the Thryve Flutter SDK has been renamed from `module_shealth` to `module_samsung_health`.

To ensure compatibility, update all references in your codebase to use the new module name. Refer to the sample implementation below for guidance.
{% endhint %}

```yaml
...
dependencies:
  flutter:
    sdk: flutter
    
  thryve_sdk:
    path: plugin/thryve_sdk // required for all integrations
  module_samsung_health:
    path: plugin/module_samsung_health // optional, required for Samsung Health integration
  module_health_connect:
    path: plugin/module_health_connect // optional, required for Health Connect integration
  module_apple_health:
    path: plugin/module_apple_health // optional, required for Apple Healthkit integration
  module_shen_ai:
    path: plugin/module_shen_ai // optional, required for ShenAI integration
...
```

* Add the Thryve Pods Spec source to `Podfile` and/or Android dependencies repository to `build.gradle`&#x20;

{% tabs %}
{% tab title="iOS" %}
Add the Thryve Pods spec source the the Podfile

```ruby
platform :ios, '13.0'

source 'https://git.thryve.de/thryve/Specs'
...
```

{% endtab %}

{% tab title="Android" %}
Add the following to the project's `android/build.gradle`&#x20;

<pre class="language-gradle"><code class="lang-gradle"><strong>...
</strong><strong>allprojects {
</strong>    repositories {
        google()
        mavenCentral()
        ....
        //Thryve Maven Repository
        maven {
        url "https://git.thryve.de/api/v4/projects/12/packages/maven"
        credentials {
            username = thryveUsername // the Thryve git token name
            password = thryvePassword // the Thryve git token
        }
        ...
}
...
</code></pre>

{% endtab %}
{% endtabs %}

{% hint style="info" %}
For more details refer to the [sample code](https://git.thryve.de/thryve/flutter/-/tree/main) demonstrating the SDK configuration.
{% endhint %}

### Migrating to Flutter SDK 5.2.0

### Breaking Changes (5.2.0)

#### Samsung Health

{% hint style="danger" %}
Starting with version 5.2.0, the Samsung Health plugin in the Thryve Flutter SDK has been renamed from `module_shealth` to `module_samsung_health`.

To ensure compatibility, update all references in your codebase to use the new module name.&#x20;
{% endhint %}

**Samsung Health data types replaced**

{% hint style="warning" %}
Starting with version 5.2.0, `SHealthDataType` enum has been renamed  to `ThryveSamsungHealthDataType`.

To ensure compatibility, update all references in your codebase to use the new `ThryveSamsungHealthDataType` .
{% endhint %}

The entire `ThryveSamsungHealthDataType` enum has been replaced to align with the new Samsung Health data model. All previous values are removed with no backwards-compatible aliases.

**You must update every reference** in your app to use the new values listed in the [ThryveSamsungHealthDataType reference](https://docs.thryve.health/thryve-data-sources/samsung-health#step-2-use-the-new-configuration-model).

#### **Health Connect `HealthConnectDataType` renamed**

{% hint style="danger" %}
Starting with version 5.2.0, `HealthConnectDataType` enum has been renamed  to `ThryveHealthConnectDataType`.

To ensure compatibility, update all references in your codebase to use the new `ThryveHealthConnectDataType` .
{% endhint %}

#### **Apple Health `HKConnectorType` renamed**

{% hint style="danger" %}
Starting with version 5.2.0, `HKConnectorType` enum has been renamed  to `ThryveHealthConnectDataType`.

To ensure compatibility, update all references in your codebase to use the new `ThryveAppleHealthDataType` .
{% endhint %}


---

# 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://docs.thryve.health/integrate-your-mobile-app/setup-thryve-sdk/flutter.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.
