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

# Flutter SDK

Let's explore how to make a simple SendingNetwork client with the ability to sync messages, create a chat room, and post messages in the room.

When you complete this quickstart, you’ll have a fully running application that can send and receive messages on a demo app. To integrate and initialize SDK written in Dart, follow these steps:

## **1  Get the code**

```
https://github.com/Sending-Network/sendingnetwork-dart
```

## **2  Configure the wallet address and private key**

```
String privKey wallet private Private key"; 
String addressHexAll = "wallet address";
```

## **3  Configure the dependencies in your&#x20;*****pubspec.yaml*****&#x20;file**

Add the following dependencies in the same directory:

```yaml
sendingnetwork_flutter_demo
sendingnetwork_dart_sdk
sendingnetworkdart_api_lite
```

In the same *pubspec.yaml* file, include `sendingnetwork_dart_sdk` as a local path dependency:

```yaml
sdn_api_lite:
  path: ../sendingnetworkdart_api_lite
Similarly, include sendingnetwork_flutter_demo as a local path dependency:
```

```yaml
sdn:
  path: ../sendingnetwork_dart_sdk/
Refer to the configuration of sendingnetwork_flutter_demo for more details.
```

## **4  Import the SDK:**

```dart
import 'package:sdn/sdn.dart';
```

## **5  import `package:sdn/sdn.dart`;**

Create a client and provide the server domain:

```dart
final client = Client('SDN Example Chat', databaseBuilder: (_) async {
  final dir = await getApplicationSupportDirectory();
  final db = HiveCollectionsDatabase('sdn_example_chat', dir.path);
  await db.open();
  return db;
});
client.sdnnode = Uri.parse('https://XXX.network'); // Replace with your server's domain
```

## **6  Run the demo:**

```
flutter pub get
flutter run
```

By running the demo, you should be able to log in, create rooms, and send messages. You will be able to see rooms created on other platforms that have integrated with SendingNetwork as well.


---

# 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://sending-network.gitbook.io/sending.network/sdk-documentation/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.
