<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: RoleWong</title>
    <description>The latest articles on DEV Community by RoleWong (@runlinwang).</description>
    <link>https://dev.to/runlinwang</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1448706%2F60d73240-8279-4f15-8dea-33fa980a4da3.jpeg</url>
      <title>DEV Community: RoleWong</title>
      <link>https://dev.to/runlinwang</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/runlinwang"/>
    <language>en</language>
    <item>
      <title>Effortlessly Implement Multi-terminal Adaptation Chat Apps Integration using Flutter Chat UIKit</title>
      <dc:creator>RoleWong</dc:creator>
      <pubDate>Fri, 26 Apr 2024 03:21:26 +0000</pubDate>
      <link>https://dev.to/runlinwang/effortlessly-implement-multi-terminal-adaptation-chat-apps-integration-using-flutter-chat-uikit-1b5</link>
      <guid>https://dev.to/runlinwang/effortlessly-implement-multi-terminal-adaptation-chat-apps-integration-using-flutter-chat-uikit-1b5</guid>
      <description>&lt;p&gt;The digital landscape is a challenging terrain for developers aiming to create real-time, interactive products. The need &lt;strong&gt;for low latency, high availability, and cross-platform&lt;/strong&gt; compatibility is paramount. With a myriad of devices — from smartphones and tablets to desktops and IoT screens — it’s a daunting task to provide a uniform, high-performance chat experience across all platforms.&lt;/p&gt;

&lt;p&gt;Traditionally, developers have had to invest substantial time and energy to individually tailor their applications for each device and platform. Web-based solutions, while offering a quick fix for multi-platform deployment, often compromise on performance and user experience.&lt;/p&gt;

&lt;p&gt;But now, with the advent of Flutter’s multi-platform capabilities, developers can breathe a sigh of relief. The ability to develop comprehensive applications that deliver near-native performance across all platforms is no longer a distant dream. That is why we’re thrilled to unveil our latest offering — the &lt;a href="https://trtc.io/products/chat?source=flutter_article_blog_1_dv&amp;amp;utm_campaign=social"&gt;Flutter Chat UIKit&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  What sets our UIKit apart?
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Cross-Platform Compatibility
&lt;/h3&gt;

&lt;p&gt;● &lt;strong&gt;Tablet&lt;/strong&gt; embedded settings support&lt;/p&gt;

&lt;p&gt;● Seamless integration with single codebase in just two steps for streamlined development&lt;/p&gt;

&lt;p&gt;● &lt;strong&gt;Full platform（mobile, tablet, desktop, and web）&lt;/strong&gt;support&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Feb90zzgsk5vgpmg9dfpo.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Feb90zzgsk5vgpmg9dfpo.jpg" alt="Tencent Cloud Chat Flutter UIKit" width="800" height="417"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  2. The industry’s first to support IoT terminals
&lt;/h3&gt;

&lt;p&gt;● Flexible in controlling &lt;strong&gt;smart IoT products&lt;/strong&gt;, such as central control panels in smart home systems&lt;/p&gt;

&lt;p&gt;● Streamlined operation logic for embedded terminal devices&lt;/p&gt;

&lt;p&gt;● The ability to facilitate cross-terminal chat communication and real-time, &lt;strong&gt;ultra-low latency control&lt;/strong&gt; of IoT devices using signaling messages for effective devices management&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Customizable UI Components
&lt;/h3&gt;

&lt;p&gt;● Conversation, Message, Contact, Voice / Video Calls, etc.&lt;/p&gt;

&lt;p&gt;● Theme customization options with &lt;strong&gt;Dark&lt;/strong&gt; and &lt;strong&gt;Light&lt;/strong&gt; modes supports.&lt;/p&gt;

&lt;p&gt;● Comprehensive chat capabilities along with delightful user experience features, like rich animations, haptic feedback and modern design.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Versatile Applications
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgtfwdkluh7bwfyp0acpy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgtfwdkluh7bwfyp0acpy.png" alt="Versatile Applications" width="800" height="402"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  5. Wide-reaching Global Deployment
&lt;/h3&gt;

&lt;p&gt;● Optimized for networks in 200+ countries&lt;/p&gt;

&lt;p&gt;● Support for multiple languages（English, Arabic, Japanese, Korean, Chinese, with supports to add more）&lt;/p&gt;

&lt;h3&gt;
  
  
  6. Reliable Audio/Video
&lt;/h3&gt;

&lt;p&gt;● Under 300 ms latency&lt;/p&gt;

&lt;p&gt;● 100% sending success rate in a 60% weak network packet loss situation&lt;/p&gt;

&lt;h3&gt;
  
  
  7. Designed with Developers in Mind
&lt;/h3&gt;

&lt;p&gt;● Selective importing of components, modular packages, with &lt;strong&gt;auto-navigation&lt;/strong&gt; supports&lt;/p&gt;

&lt;p&gt;● Streamlined component parameter design&lt;/p&gt;

&lt;p&gt;● Global and component instances level management&lt;/p&gt;

&lt;p&gt;● Clear code naming conventions and detailed comments&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Besides, you can explore our comprehensive demo on &lt;a href="https://github.com/TencentCloud/chat-demo-flutter/tree/v2"&gt;GitHub Repo&lt;/a&gt; for a more direct and immersive experience.&lt;/em&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Effortless Integration: Get Started with Our Flutter Chat UIKit
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Setting Up Your Application in the Console
&lt;/h3&gt;

&lt;p&gt;Let’s begin with the Console operations:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Create an Account:&lt;/strong&gt; Visit the &lt;a href="https://console.trtc.io/?source=flutter_article_blog_1_dv&amp;amp;utm_campaign=social"&gt;Console&lt;/a&gt; of trtc.io and create an account by following the prompts.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Start a Free Trial:&lt;/strong&gt; Create an application on the homepage and start your free trial.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fw9lal8mi28veiibq5mix.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fw9lal8mi28veiibq5mix.png" alt="Console" width="800" height="316"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Generate Test Users:&lt;/strong&gt; Create two users (test accounts) on &lt;a href="https://console.trtc.io/chat/account-management?source=flutter_article_blog_1_dv&amp;amp;utm_campaign=social"&gt;Account Management&lt;/a&gt;. Following by use the &lt;a href="https://console.trtc.io/usersig?source=flutter_article_blog_1_dv&amp;amp;utm_campaign=social"&gt;UserSig Tools&lt;/a&gt; to create the corresponding &lt;em&gt;UserSigs&lt;/em&gt; for them, note down the &lt;em&gt;UserSigs&lt;/em&gt; for later use.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Foean4vyndw4br939471e.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Foean4vyndw4br939471e.png" alt="UserSig Tools" width="800" height="407"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Retrieve Your SDKAppID:&lt;/strong&gt; Go to &lt;a href="https://console.trtc.io/app?source=flutter_article_blog_1_dv&amp;amp;utm_campaign=social"&gt;Applications&lt;/a&gt;, select your newly created application, and navigate to the corresponding &lt;a href="https://console.trtc.io/overview?source=flutter_article_blog_1_dv&amp;amp;utm_campaign=social"&gt;Application Overview&lt;/a&gt; to find your &lt;em&gt;SDKAppID&lt;/em&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6zsnufemp3tj5ne8l9ib.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6zsnufemp3tj5ne8l9ib.png" alt="Application Overview" width="800" height="267"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;At this point, the Console setup is complete. Make sure to note down the &lt;em&gt;SDKAppID&lt;/em&gt; and the two sets of &lt;em&gt;UserID&lt;/em&gt; and &lt;em&gt;UserSig&lt;/em&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Quickly Integrate with Flutter Chat UIKit
&lt;/h3&gt;

&lt;p&gt;The following steps provide a simplified overview of integrating with our Flutter Chat UIKit. For a detailed integration process, please refer to this guide: &lt;a href="https://www.tencentcloud.com/document/product/1047/58585?from=flutter_dev"&gt;Detailed Integration Guide&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;To begin, it’s best to have a Flutter project ready or create a new one to fully experience this tutorial. We recommend following the steps to &lt;a href="https://docs.flutter.dev/get-started/codelab"&gt;create a new Flutter project&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Furthermore, the upcoming steps involve client-side project and code operations. To enhance your understanding, you can refer to the source code of this simplied integration project showcased later, available on &lt;a href="https://github.com/TencentCloud/chat-uikit-flutter/tree/v2/tencent_cloud_chat/example"&gt;GitHub&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Note:&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;a href="https://github.com/TencentCloud/chat-uikit-flutter/tree/v2/tencent_cloud_chat/example"&gt;This source code repo&lt;/a&gt; is only for showcasing the simplifed integration purpose, for the following tutorial. If you’re interested in exploring a fully-fledged app with an extensive range of features, advanced capabilities, and customization options, please check out &lt;a href="https://github.com/TencentCloud/chat-demo-flutter/tree/v2"&gt;This Repo&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  1. Import the Packages
&lt;/h4&gt;

&lt;p&gt;To get started, import the base package, &lt;a href="https://pub.dev/packages/tencent_cloud_chat"&gt;tencent_cloud_chat&lt;/a&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;flutter pub add tencent_cloud_chat
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Next, import the UI component packages that suit your needs:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;flutter pub add tencent_cloud_chat_message
flutter pub add tencent_cloud_chat_conversation
flutter pub add tencent_cloud_chat_contact
flutter pub add tencent_cloud_chat_user_profile
flutter pub add tencent_cloud_chat_group_profile
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;For demonstration purposes, we suggest &lt;strong&gt;importing all of them&lt;/strong&gt;. However, in real-world projects, you can import packages based on your specific requirements.&lt;/em&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  2. Initial Setup for UIKit
&lt;/h4&gt;

&lt;p&gt;Before you start using each Modular Package UI component, follow these initial setup steps:&lt;/p&gt;

&lt;h5&gt;
  
  
  Global Configuration:
&lt;/h5&gt;

&lt;p&gt;Replace your project’s &lt;code&gt;MaterialApp&lt;/code&gt; by &lt;code&gt;TencentCloudChatMaterialApp&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;This enables automatic management and configuration of language, theme (with material3), theme mode, and other settings. If you prefer manual configuration, refer to &lt;a href="https://www.tencentcloud.com/document/product/1047/58585#ab6bd508-218a-4002-9b76-0ee081e8929a"&gt;Implement the global configuration for UIKit manually&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;h5&gt;
  
  
  Initialization and Login
&lt;/h5&gt;

&lt;p&gt;Call &lt;code&gt;TencentCloudChat.controller.initUIKit&lt;/code&gt; to initialize and log in.&lt;/p&gt;

&lt;p&gt;Pass in the &lt;code&gt;sdkAppID&lt;/code&gt;, &lt;code&gt;userID&lt;/code&gt;, and &lt;code&gt;userSig&lt;/code&gt; of your Tencent Cloud Chat application. Also, declare the register of each sub Modular UI Package in the &lt;code&gt;usedComponentsRegister&lt;/code&gt; list.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="n"&gt;TencentCloudChat&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;controller&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;initUIKit&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="nl"&gt;options:&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;TencentCloudChatInitOptions&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="nl"&gt;sdkAppID:&lt;/span&gt; &lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="c1"&gt;/// [Required]: The SDKAppID of your Tencent Cloud Chat application&lt;/span&gt;
    &lt;span class="nl"&gt;userID:&lt;/span&gt; &lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="c1"&gt;/// [Required]: The userID of the logged-in user&lt;/span&gt;
    &lt;span class="nl"&gt;userSig:&lt;/span&gt; &lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="c1"&gt;/// [Required]: The userSig of the logged-in user&lt;/span&gt;
  &lt;span class="p"&gt;),&lt;/span&gt;
  &lt;span class="nl"&gt;components:&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;TencentCloudChatInitComponentsRelated&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt; &lt;span class="c1"&gt;/// [Required]: The modular UI components related settings, taking effects on a global scale.&lt;/span&gt;
    &lt;span class="nl"&gt;usedComponentsRegister:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
      &lt;span class="c1"&gt;/// [Required]: List of registration functions for the components used in the Chat UIKit.&lt;/span&gt;
          &lt;span class="n"&gt;TencentCloudChatConversationManager&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;register&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
          &lt;span class="n"&gt;TencentCloudChatMessageManager&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;register&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
          &lt;span class="n"&gt;TencentCloudChatUserProfileManager&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;register&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
          &lt;span class="n"&gt;TencentCloudChatGroupProfileManager&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;register&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
          &lt;span class="n"&gt;TencentCloudChatContactManager&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;register&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="p"&gt;],&lt;/span&gt;
  &lt;span class="p"&gt;),&lt;/span&gt;
&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Perfect! With the global configuration complete, we’re now ready to dive into the usage of our Modular UI Components. Let’s explore how they can enhance your chat application experience.&lt;/p&gt;

&lt;h4&gt;
  
  
  3. Integrating Modular UI Components
&lt;/h4&gt;

&lt;p&gt;In most use cases, you’ll need to manually instantiate and add the &lt;code&gt;TencentCloudChatConversation&lt;/code&gt; and &lt;code&gt;TencentCloudChatContact&lt;/code&gt; components to a widget, if necessary.&lt;/p&gt;

&lt;p&gt;Other components are automatically navigated based on user actions.&lt;/p&gt;

&lt;p&gt;In this tutorial, we’ll use the &lt;code&gt;bottomNavigationBar&lt;/code&gt; to manage the pages and switch between the &lt;code&gt;TencentCloudChatConversation&lt;/code&gt; and &lt;code&gt;TencentCloudChatContact&lt;/code&gt; components.&lt;/p&gt;

&lt;p&gt;First, declare a &lt;code&gt;currentIndex&lt;/code&gt; variable and a &lt;code&gt;List&amp;lt;Widget&amp;gt; pages&lt;/code&gt; array to indicate the currently selected component and store the component instances.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="kt"&gt;List&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;Widget&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;pages&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[];&lt;/span&gt;
&lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;currentIndex&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Store the instances in the &lt;code&gt;pages&lt;/code&gt; array.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="n"&gt;pages&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
      &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;TencentCloudChatConversation&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;
      &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;TencentCloudChatContact&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;
&lt;span class="p"&gt;];&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Finally, modify the &lt;code&gt;build&lt;/code&gt; method as follows:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight dart"&gt;&lt;code&gt;&lt;span class="nd"&gt;@override&lt;/span&gt;
  &lt;span class="n"&gt;Widget&lt;/span&gt; &lt;span class="n"&gt;build&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;BuildContext&lt;/span&gt; &lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;Scaffold&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
      &lt;span class="nl"&gt;bottomNavigationBar:&lt;/span&gt; &lt;span class="n"&gt;BottomNavigationBar&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="nl"&gt;type:&lt;/span&gt; &lt;span class="n"&gt;BottomNavigationBarType&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;fixed&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="nl"&gt;currentIndex:&lt;/span&gt; &lt;span class="n"&gt;currentIndex&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="nl"&gt;onTap:&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;index&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="kd"&gt;async&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
          &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;index&lt;/span&gt; &lt;span class="o"&gt;!=&lt;/span&gt; &lt;span class="n"&gt;currentIndex&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="n"&gt;setState&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
                  &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
                &lt;span class="n"&gt;currentIndex&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;index&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
              &lt;span class="p"&gt;},&lt;/span&gt;
            &lt;span class="p"&gt;);&lt;/span&gt;
          &lt;span class="p"&gt;}&lt;/span&gt;
        &lt;span class="p"&gt;},&lt;/span&gt;
        &lt;span class="nl"&gt;items:&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
          &lt;span class="n"&gt;BottomNavigationBarItem&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
              &lt;span class="nl"&gt;icon:&lt;/span&gt; &lt;span class="n"&gt;Icon&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;Icons&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;chat_bubble_outline&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="nl"&gt;label:&lt;/span&gt; &lt;span class="s"&gt;"Chats"&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
          &lt;span class="n"&gt;BottomNavigationBarItem&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
              &lt;span class="nl"&gt;icon:&lt;/span&gt; &lt;span class="n"&gt;Icon&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;Icons&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;contacts&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="nl"&gt;label:&lt;/span&gt; &lt;span class="s"&gt;"Contacts"&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
        &lt;span class="p"&gt;],&lt;/span&gt;
      &lt;span class="p"&gt;),&lt;/span&gt;
      &lt;span class="nl"&gt;body:&lt;/span&gt; &lt;span class="n"&gt;pages&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;currentIndex&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
    &lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And that’s it! You’ve successfully integrated the components.&lt;/p&gt;

&lt;p&gt;Looking back, you can see that the simplified integration code on &lt;a href="https://github.com/TencentCloud/chat-uikit-flutter/tree/v2/tencent_cloud_chat/example"&gt;GitHub&lt;/a&gt;.&lt;/p&gt;

&lt;h4&gt;
  
  
  4. Experience the Flutter Chat UIKit in Action
&lt;/h4&gt;

&lt;p&gt;Now, let’s run the project and experience the Flutter Chat UIKit.&lt;/p&gt;

&lt;p&gt;Log in with the first test account created in the &lt;code&gt;initUIKit&lt;/code&gt; method and launch the app.&lt;/p&gt;

&lt;p&gt;Start by running &lt;code&gt;flutter run&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Note: If you encounter issues with &lt;a href="https://github.com/TencentCloud/chat-uikit-flutter/blob/v2/tencent_cloud_chat/example/ios/Podfile#L40"&gt;iOS not running&lt;/a&gt; or &lt;a href="https://github.com/TencentCloud/chat-uikit-flutter/blob/v2/tencent_cloud_chat/example/android/app/build.gradle#L48"&gt;Android SDK version mismatch&lt;/a&gt;, please refer to our &lt;a href="https://github.com/TencentCloud/chat-uikit-flutter/tree/v2/tencent_cloud_chat/example"&gt;sample app repo&lt;/a&gt; and choose the appropriate version configuration.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Once you’ve successfully entered the app, you’ll see the Conversation and Contact pages, with the ability to switch between them at the bottom.&lt;/p&gt;

&lt;p&gt;However, there are no conversations to test yet.&lt;/p&gt;

&lt;p&gt;Don’t worry! Switch to the Contacts page, click ‘&lt;em&gt;Add Contact&lt;/em&gt;’ in the top-right corner, and add the other test account as a contact. You’ll now see the other account in the Contacts list.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fe0co9elqm12fhvyhclyc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fe0co9elqm12fhvyhclyc.png" alt="Contacts" width="800" height="839"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Click on the contact to start chatting.&lt;/p&gt;

&lt;p&gt;You can also rerun the app, log in with the other user’s UserID, and experience sending messages to each other.&lt;/p&gt;




&lt;p&gt;In conclusion, we’ve now completed the entire simplified integration process. Thank you for experiencing the power of Tencent Cloud Flutter Chat UIKit.&lt;/p&gt;

&lt;p&gt;For more information on detailed integration, configuration, and advanced usage, please refer to this guide: &lt;a href="https://www.tencentcloud.com/document/product/1047/58585?from=flutter_dev"&gt;Detailed Integration Guide&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;If you have any questions, feel free to &lt;a href="https://t.me/+1doS9AUBmndhNGNl"&gt;contact us&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;We appreciate your interest and support. Happy coding!&lt;/p&gt;

</description>
      <category>flutter</category>
      <category>dart</category>
    </item>
  </channel>
</rss>
