Last updated: 2021-05-20 19:54:56

    This document describes how to quickly run the TRTC demo for Flutter.

    Environment Requirements

    • Flutter 2.0 or above
    • Developing for Android:
      • Android Studio 3.5 or above
      • Devices with Android 4.1 or above
    • Developing for iOS:
      • Xcode 11.0 or above
      • Your project has a valid developer signature.


    You have signed up for a Tencent Cloud account and completed identity verification.


    Step 1. Create an application.

    1. Log in to the TRTC console and select Development Assistance > Demo Quick Run.
    2. Enter an application name, e.g. TestTRTC, and click Create.

    Step 2. Download the SDK and demo source code.

    1. Download the SDK and demo source code for your platform.
    2. Click Next step.

    Step 3. Configure demo project files.

    1. In the Modify Configuration step, select the platform in line with the source package downloaded.
    2. Find and open /example/lib/debug/GenerateTestUserSig.dart.
    3. Set parameters in GenerateTestUserSig.dart as follows.
      • SDKAPPID: `PLACEHOLDER` by default. Set it to the actual `SDKAppID`.
      • SECRETKEY: `PLACEHOLDER` by default. Set it to the actual key.
    4. Click Next step to complete the creation.
    5. After compilation, click Return to Overview Page.

    • The method for generating UserSig described in this document involves configuring SECRETKEY in client code. In this method, SECRETKEY may be easily decompiled and reversed, and if your key is leaked, attackers can steal your Tencent Cloud traffic. Therefore, this method is only suitable for the local execution and debugging of the demo.
    • The correct UserSig distribution method is to integrate the calculation code of UserSig into your server and provide an application-oriented API. When UserSig is needed, your application can send a request to the business server for a dynamic UserSig. For more information, see How do I calculate UserSig on the server?.

    Step 4. Compile and run the project.

    1. Run flutter pub get.
    2. Compile, run, and debug the project.


    1. Run flutter run.
    2. Open the demo project with Android Studio (3.5 or above).
    3. Run the project.


    1. Open \ios project in the source code directory with Xcode (11.0 or above).
    2. Compile and run the demo project.