# Flutter

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

## 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

```yaml
...
dependencies:
  flutter:
    sdk: flutter
    
  thryve_sdk:
    path: plugin/thryve_sdk // required for all integrations
  module_shealth:
    path: plugin/module_shealth // 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://nexus.external.thryve.de/repository/releases/"
        credentials {
            username = thryveUsername // the Thryve assigned username
            password = thryvePassword // the Thryve assigned password
        }
        ...
}
...
</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 %}


---

# Agent Instructions: 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:

```
GET https://docs.thryve.health/integrate-your-mobile-app/setup-thryve-sdk/flutter.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
