# Compile and run a sample project (/en/realtime-media/voice/build/set-up-your-project/compile-run-sample-project/flutter)

> For AI agents: see the complete documentation index at [llms.txt](/llms.txt).

Agora provides [Open-source sample projects on GitHub](https://github.com/AgoraIO-Extensions/Agora-Flutter-SDK) to demonstrate the implementation of basic and advanced Voice SDK features.

This page shows how to compile, configure, and run the Voice SDK Flutter sample project.

## Prerequisites

* [Flutter](https://docs.flutter.dev/get-started/install) 2.10.5 or higher with Dart 2.14.0 or higher.
* [Android Studio](https://developer.android.com/studio), IntelliJ, VS Code, or any other IDE that supports Flutter. See [Set up an editor](https://docs.flutter.dev/get-started/editor).
* Prepare your development and testing environment according to your [target platform](../../reference/supported-platforms.md).

Run the `flutter doctor` command to confirm that your development environment is set up correctly for Flutter development.

* A microphone

* A valid Agora account and project. Please refer to [Agora account management](/en/introduction/account) for details.

* Installed [Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git)

## Project setup

### Get the sample project

Run the following command to clone the repository locally:

```bash
git clone git@github.com:AgoraIO-Extensions/Agora-Flutter-SDK.git
```

This repository contains the following sample projects for Agora Flutter Video SDK:

| Description       | Path                             |
| :---------------- | :------------------------------- |
| Basic functions   | `/example/lib/examples/basic`    |
| Advanced features | `/example/lib/examples/advanced` |

### Configure the sample project

1. **Install dependencies**

   In the project root directory, run the following command to install the dependencies:

   ```bash
   flutter pub get
   ```

2. **Set the App ID and Token**

   Open the `/example/lib/config/agora.config.dart` file, fill in the `defaultValue` for the App ID, channel name, and temporary token you obtained from Agora Console.

   ```dart
   String get appId {
    return '<TEST_APP_ID>';
   }

   String get token {
    return '<TEST_TOKEN>';
   }

   String get channelId {
    return '<TEST_CHANNEL_ID>';
   }
   ```

## Run the sample project

1. Connect the target device to your computer.

2. Open terminal and navigate to the `/examples` directory.

3. Execute the following command to launch the sample project on available devices:

   ```bash
   flutter run
   ```

4. After compilation is complete, you see the following application on your device:

   ![image](https://assets-docs.agora.io/images/video-sdk/run-compile-flutter-step-4.png)

5. Select a demo you want to experience from the menu. Choose **JoinChannelVideo** under **Basic** as an example. Enter the channel name you specified when generating the temporary token in **Channel ID**, and click **Join channel**.

6. To test various audio and video interaction use-cases, connect to the [Agora web demo](https://webdemo.agora.io/basicVideoCall/index.html), or install and run the sample project on a second device. Make sure you use the same app ID on both devices. When you join the same channel from two devices, you can see and hear each other.

   ![image](https://assets-docs.agora.io/images/video-sdk/run-compile-flutter-step-6.png)

    
  
      
  
      
  
      
  
      
  
      
  
      
  
