Skip to main content
CometChatSearch provides unified search functionality across conversations and messages. In V6, it uses a single consolidated SearchBloc replacing the three separate controllers from V5.

Where It Fits

CometChatSearch is typically launched from a search button in the conversations list or message header. It searches across both conversations and messages, displaying results in categorized sections.

Quick Start

Using Navigator:
Embedding as a widget:
Launching from conversations with search button:
Prerequisites: CometChat SDK initialized with CometChatUIKit.init() and a user logged in.

Actions and Events

Callback Methods

onConversationItemClick

Fires when a conversation result is tapped.

onMessageItemClick

Fires when a message result is tapped.

onBack

Fires when the user presses the back button.

onError

Fires on internal errors.

Functionality


Custom View Slots

Conversation Item View

Replace the conversation result item.

Message Item View

Replace the message result item.

State Views


Advanced

BLoC Access

The search widget uses SearchBloc internally:

V5 → V6 Migration


Style


Next Steps

Conversations

Browse recent conversations

Message List

Display messages in a conversation

Component Styling

Detailed styling reference

Users

Browse available users