Open lib/config.dart, and specify the sdkappid, userid, and usersig obtained and generated in the previous step.
Warning:
The correct UserSig distribution method is to integrate the calculation code of UserSig into your server and provide an app-oriented API. When UserSig is needed, your app can send a request to the business server to obtain a dynamic UserSig. For more information, see How to Generate UserSig on the Server.
To respect the copyright of emoji design, the downloaded demo project does not contain sliced images of major emoji elements. You can use your local emoji packs to configure code. Unauthorized use of the emoji pack in the Chat demo may infringe on the design copyright.
4. Compile and Run the Demo
flutter run
Expanding to More Platforms
Tencent Cloud Chat for Flutter SDKs support Android, iOS and Windows platforms by default. You can also expand to more platforms (web and macOS).
Web
To enable support for web, you need to perform the following extra steps in addition to those for enabling support for Android and iOS:
Upgrading to Flutter 3.x
Flutter 3.x has been dramatically optimized for web performance and is highly recommended for Flutter web project development.
Importing JS
Note:
If your existing Flutter project does not support web, run flutter create . in the root directory of the project to add web support.
Go to the web/ directory of your project and run npm or yarn to install relevant JS dependencies. Initialize the project as instructed.
cd web
npm init
npm i @tencentcloud/chat
npm i tim-upload-plugin
Open web/index.html and import the JS files in <head> </head>. See below: