tencent cloud

Chat

News and Announcements
Release Notes
Announcements
Product Introduction
Overview
Basic Concepts
Scenarios
Features
Account System
User Profile and Relationship Chain
Message Management
Group Related
Official Account
Audio/Video Call
Use Limits
Purchase Guide
Billing Overview
Pricing
Purchase Instructions
Renewal Guide
Service Suspension Explanation
Refund Policy
Development Guidelines
Demo Zone
Activate Service
Free Demos
Quick Run
Download
SDK and Demo Source Code
Update Log
Chat Interaction (UI Included)
TUIKit Introduction
Getting Started
Full-feature Integration
Single-function Integration
Build with AI
Build Basic Interfaces
More Features
Customizing Appearance
Internationalization
Push Service
Overview
Noun explanation
Activate the Service
Quick Start
Manufacturer Channel
Statistics
Troubleshooting Tool
Client APIs
REST API
Push Callback
Advanced Features
Release Notes
Error Codes
FAQS
Desk
Overview
Quick Start
Integration Guide
Admin Operation Manual
Agent Manual
More Practices
Live Streaming Setup Guide
AI Chatbot
Super Large Entertainment and Collaboration Community
Discord Implementation Guide
How to Integrate Chat into Games
WhatsApp Channel-style Official Account Integration Solution
Send Red Packet
Firewall Restrictions
No UI Integration
Quick Start
SDK Integration
Initialization
Login and Logout
Message
Conversation
Group
Community Topic
User Profile and Relationship Chain
Offline Push
Cloud Search
Local Search
Official Channel Management
Client APIs
JavaScript
Android
iOS & macOS
Swift
Flutter
Electron
Unity
React Native
C APIs
C++
Server APIs
Secure authentication with UserSig
RESTful APIs
Webhooks
Console Guide
New Console Introduction
Creating and Upgrading an Application
Basic Configuration
Feature Configuration
Account Management
Group Management
Official Channel Management
Webhook Configuration
Usage
Viewing Guide for Resource Packages
Real-Time Monitor
Auxiliary Development Tools
Access Management
Advanced Features
FAQs
uni-app FAQs
Purchase
SDK
Account Authentication
User Profile and Relationship Chain
Message
Group
Audio-Video Group
Nickname and Profile Photo
Security Compliance Certification
Service Level Agreement
Security Compliance Certification
Chat Policies
Privacy Policy
Data Privacy and Security Agreement
Migration
Migration Solutions
Migration Solutions Lite
Error Codes
Contact Us

Flutter

PDF
Focus Mode
Font Size
Last updated: 2026-03-02 18:07:07

Component Overview

The Search component provides a full-featured search experience, including a search bar, results display, and seamless page navigation. It supports searching for users, groups, and messages, and offers extensive interactive Webhook integration for custom workflows.
Note
Search is available in the Pro edition and Enterprise edition. To use Search function, you need to purchase either the Pro or Enterprise package. For details, see Billing Information.
Search Entry
Search Results



Component Integration

Search is included in TUIKit Flutter. To use the Search component, integrate TUIKit Flutter into your project and complete the login flow. For detailed integration steps, refer to the TUIKit Flutter documentation.

Component Descriptions

SearchBar serves as the primary Widget for search and is typically placed at the top of your Scaffold body. Only the initialization method for the Search component is exposed; all internal logic is handled within SearchBar.
Method
Parameter
Description
SearchBar
onContactSelect: (FriendSearchInfo selectedContact) {}
Webhook triggered when a contact result is clicked; optional parameter.
SearchBar
onGroupSelect: (GroupSearchInfo selectedGroup) {}
Webhook triggered when a group result is clicked; optional parameter.
SearchBar
onConversationSelect: (MessageSearchResultItem selectedConversation) {}
Webhook triggered when a conversation result is clicked; optional parameter.
SearchBar
onMessageSelect: (MessageInfo selectedMessage) {}
Webhook triggered when a message result is clicked; optional parameter.

Basic Usage

SearchBar manages navigation for search results in two ways:
Automatic Routing: When users click the More button or a chat history item in the search results page, the component uses Flutter's Navigator to automatically handle page transitions.
Custom Routing: When a user selects a contact, group, conversation, or message, the corresponding Webhook (onContactSelect, onGroupSelect, onConversationSelect, or onMessageSelect) is triggered. Implement your custom navigation logic within these Webhooks (for example, routing to your own chat interface).
Example:

To initialize and use SearchBar, simply add it to your widget tree:
SearchBar(
onContactSelect: (FriendSearchInfo selectedContact) {
// Handle contact selection
},

onGroupSelect: (GroupSearchInfo selectedGroup) {
// Handle group selection
},

onConversationSelect: (MessageSearchResultItem selectedConversation) {
// Handle conversation selection
},

onMessageSelect: (MessageInfo selectedMessage) {
// Handle message selection
},
),


Help and Support

Was this page helpful?

Help us improve! Rate your documentation experience in 5 mins.

Feedback