Skip to main content
Version: v5


A Widget To Search For Messages Across Channels

Find the documentation here


Users in Stream Chat can have several channels and it can get hard to remember which channel has the message they are searching for. As such, there needs to be a way to search for a message across multiple channels. This is where StreamMessageSearchListView comes in.


Make sure to check the StreamMessageSearchListController documentation for more information on how to use the controller to manipulate the StreamMessageSearchListView.

Basic Example

While the StreamMessageListView is tied to a certain StreamChannel, a StreamMessageSearchListView is not.

class StreamMessageSearchPage extends StatefulWidget {
const StreamMessageSearchPage({
required this.client,

final StreamChatClient client;

State<StreamMessageSearchPage> createState() => _StreamMessageSearchState();

class _StreamMessageSearchState extends State<StreamMessageSearchPage> {
late final _controller = StreamMessageSearchListController(
client: widget.client,
limit: 20,
filter: Filter.in_(
searchQuery: 'your query here',

void dispose() {

Widget build(BuildContext context) => Scaffold(
body: StreamMessageSearchListView(
controller: _controller,

Customize The Result Tiles

You can use your own widget for the result items using the itemBuilder parameter.

// ...
itemBuilder: (context, responses, index, defaultWidget) {
return Text(responses[index].message.text);

Did you find this page helpful?