> ## Documentation Index
> Fetch the complete documentation index at: https://turnkey-0e7c1f5b-moeo-sync.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Flutter

> This documentation contains guides for using the Flutter SDK.

We have created a set of Dart packages that can be used to interact with the Turnkey API. These can be combined to create a fully-featured Flutter app, powered by Turnkey.

## Packages

| Package Name                       | Description                                                                                                                                                                               | Link                                                                                           |
| ---------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- |
| turnkey\_sdk\_flutter              | A Flutter package that simplifies the integration of the Turnkey API into Flutter applications. It provides secure session management, authentication, and cryptographic operations       | [turnkey\_sdk\_flutter](https://pub.dev/packages/turnkey_sdk_flutter)                          |
| turnkey\_http                      | A lower-level, fully typed HTTP client for interacting with the Turnkey API.                                                                                                              | [turnkey\_http](https://pub.dev/packages/turnkey_http)                                         |
| turnkey\_api\_key\_stamper         | A Dart package for API stamping functionalities. It is meant to be used with Turnkey's HTTP package.                                                                                      | [turnkey\_api\_key\_stamper](https://pub.dev/packages/turnkey_api_key_stamper)                 |
| turnkey\_flutter\_passkey\_stamper | A Flutter package for stamping payloads with passkeys. It is meant to be used with Turnkey's HTTP package.                                                                                | [turnkey\_flutter\_passkey\_stamper](https://pub.dev/packages/turnkey_flutter_passkey_stamper) |
| turnkey\_crypto                    | This package consolidates common cryptographic utilities used across our applications, particularly primitives related to keys, encryption, and decryption in a pure Dart implementation. | [turnkey\_crypto](https://pub.dev/packages/turnkey_crypto)                                     |
| turnkey\_encoding                  | This package contains decoding and encoding functions used by other Turnkey packages.                                                                                                     | [turnkey\_encoding](https://pub.dev/packages/turnkey_encoding)                                 |

You can visit [Turnkey's pub.dev publisher page](https://pub.dev/publishers/turnkey.com/packages) to see all all the packages we have published and install them in your Flutter project.

## Getting Started

The easiest way to build a Flutter app with Turnkey is to use our [Flutter demo app](https://github.com/tkhq/dart-sdk/tree/main/examples/flutter-demo-app) as a starter. This app is a fully-featured example that demonstrates how to use the Turnkey's Flutter SDK to authenticate users, create wallets, export wallets, sign messages, and more.

The app includes a backend [JavaScript server](https://github.com/tkhq/dart-sdk/tree/main/examples/flutter-demo-app/api-server) which uses [@turnkey/sdk-server](https://www.npmjs.com/package/@turnkey/sdk-server) to make requests to Turnkey that must be signed by the parent organization. An example of a request that must be signed by the parent organization is creating a [sub-organization](/concepts/sub-organizations). [(code reference)](https://github.com/tkhq/dart-sdk/blob/51405520d721910961fa942ddc5f5a3030783b9b/examples/flutter-demo-app/api-server/src/controllers/turnkey-api.ts#L139-L178)

Some requests made to Turnkey must be signed by the sub-organization. These are written in Dart and are ran by the app directly. You can find these requests in the app's [TurnkeyProvider](https://github.com/tkhq/dart-sdk/blob/main/examples/flutter-demo-app/lib/providers/turnkey.dart). An example of a request that must be signed by the sub-organization is creating a wallet. [(code reference)](https://github.com/tkhq/dart-sdk/blob/51405520d721910961fa942ddc5f5a3030783b9b/examples/flutter-demo-app/lib/providers/turnkey.dart#L531-L559)

## Video

<Frame>
  <video src="https://github.com/tkhq/dart-sdk/raw/refs/heads/main/examples/flutter-demo-app/assets/videos/flutter-demo.mov" width="100%" height="420" controls />
</Frame>

#### Complete the installation and setup by following the instructions in the [README](https://github.com/tkhq/dart-sdk/blob/main/examples/flutter-demo-app/README.md) file.
