This article describes how to quickly run the sample source code and experience basic audio and video calling services.
Ensure that your development environment meets the following requirements:
Configure the development environment as follows:
After configuring the Flutter environment in any of the preceding development environments, run flutter doctor in the CLI (terminal). If any dependencies are not prepared, download them as prompted.
Go to ZEGOCLOUD Admin Console to create a new project, and get the AppID and AppSign of your project.
The SDK now also supports using Token for authentication, if you want to change your authentication mode, refer to the Guide for upgrading the authentication mode from using the AppSign to Token.
The following figure shows the file structure in the flutter_dart subdirectory. File paths mentioned in this topic are relative to this subdirectory.
.
├─ README.md
├─ README_zh.md
├─ VERSION.txt
├─ android
├─ ios
├─ lib
│ ├─ home
│ │ ├─ global_setting_page.dart # Settings page
│ │ └─ home_page.dart # Home page
│ ├─ main.dart
│ ├─ topics
│ │ ├─ AudioAdvanced # Advanced audio features
│ │ ├─ BestPractices # Best practices
│ │ ├─ CommonFunctions # Common features
│ │ ├─ OtherFunctions # Other features
│ │ ├─ QuickStart # Quick start
│ │ ├─ StreamAdvanced # Advanced stream publishing and playing features
│ │ └─ VideoAdvanced # Advanced video features
│ └─ utils
├─ pubspec.yaml # Flutter project file
├─ resources
└─ test
iOS/Android:
Open Android Studio and select Open an existing Android Studio project to open the zego-express-flutter-sdk folder.
Connect your Android or iOS device to a computer.
Click Run in the upper right corner of Android Studio to run the sample code.

Open VS Code and select File > Open to open the zego-express-flutter-sdk folder.
In the file manager on the left of VS Code, double-click example/main.dart to open it.
Connect your Android or iOS device to a computer.
Select Run > Run without Debugging to run the sample code.
In the sample code, the appID and appSign parameters are not set, which are required for SDK initialization. To run the sample code properly, open the lib/utils/zego_config.dart file and set the parameters respectively to the AppID and AppSign obtained in Prerequisites in advance.

Web:
Open VS Code and select File > Open to open the zego-express-flutter-sdk folder.
In the file manager on the left of VS Code, right-click example to open it on the terminal.
Run flutter run -d chrome --web-renderer html on the terminal to run the sample code.
In the sample code, the appID, userID, userName, and token parameters are not set, which are required for SDK initialization. To run the sample code properly, open the lib/utils/zego_config.dart file, set userID and userName based on your requirements, and set appID and token respectively to the AppID and Token mentioned in the Prerequisites.
Temporary Token Acquisition Method
For the convenience of developers' debugging, ZEGOCLOUD Console provides the function of generating temporary tokens. Developers can directly obtain temporary tokens for use. For details, please refer to the "Project Information" section in How to view project information. However, in the developer's own online environment, it is necessary to generate tokens through their own server.
class ZegoConfig {
static final ZegoConfig instance = ZegoConfig._internal();
ZegoConfig._internal();
// ----- Persistence params -----
// Developers can get appID from admin console.
// https://console.zego.im/dashboard
// for example:
// int appID = 123456789;
int appID = 0;
ZegoScenario scenario = ZegoScenario.General;
bool enablePlatformView = false;
// Developers should customize a user ID.
// for example:
// String userID = "zego_benjamin";
String userID = "";
String userName = "";
// Developers can get token from admin console.
// https://console.zego.im/dashboard
// Note: The user ID used to generate the token needs to be the same as the userID filled in above!
// for example:
// String token = "04AAAAAxxxxxxxxxxxxxx";
String token = "";
}
Open Xcode and open example/ios/Runner.xcworkspace in your project directory.
Log in with your Apple ID.
Open Xcode, select Xcode > Preference in the upper left corner, select Accounts, and click + in the lower left corner. In the dialog that appears, select Apple ID and click Continue.

Enter your Apple ID and password to log in.

Change the value of Bundle Identifier and developer certificate.
Open Xcode and select Runner on the left.

On the General tab, change the value of Bundle Identifier.

On the Signing & Capabilities tab, select your own developer certificate in the Team drop-down list.

We recommend you run your project on a real device. If your app runs successfully, you should hear the sound and see the video captured locally from your device.
To test out the real-time audio and video features, visit the ZEGO Express Web Demo, and enter the same AppID, Server and RoomID to join the same room. If it runs successfully, you should be able to view the video from both the local side and the remote side, and hear the sound from both sides as well.
In audio-only scenarios, no video will be captured and displayed.
