logo
On this page

Run the sample code


Prerequisites

Please ensure your development environment meets the following requirements:

  • Flutter 2.0 or above.
  • iOS 13.0 or above and an iOS device or simulator that supports audio and video (real device recommended).
  • Android 8.0 or above and an Android device or simulator that supports audio and video (real device recommended). For real devices, please enable "USB debugging".
  • Device connected to the Internet.

Requirements

Please ensure the following requirements are met before running:

  • Registered an account on ZEGOCLOUD Console and obtained the AppID and AppSign required for SDK initialization.
  • Contacted ZEGOCLOUD technical support to obtain the License file for beauty effects.

Download the sample code

Run the sample code

1

Import resources and models

Download the latest version of iOS ZegoEffects SDK or Android ZegoEffects SDK, unzip it, and import the Resources and Models folders into the sample code folder you previously unzipped, and keep the original Backgrounds.bundle file.

2

Configure authentication information

In the root directory of the sample code, find the zego_config.dart.template file, remove the "template" suffix, and fill in the corresponding appID and appSign. For details, see Requirements.

// Login to the console https://console.zegocloud.com to get appID, for example const appID = 123456789;
int appID = 0;  
// Login to the console https://console.zegocloud.com to get appSign, for example "39011cbxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
String appSign = "";
3

Get dependencies

Run the following command in the root directory to pull the Flutter dependencies.

flutter pub get
4

(For iOS) Run the pod command

Run the following command in the iOS directory.

pod install
5

Run the sample code

For Android, click the Run button in the upper right corner of Android Studio to run the sample app.

flutter_run

Previous

SDK Downloads

Next

Import the SDK