# MessageSearchListView

A Widget To Search For Messages Across Channels

Find the pub.dev documentation [here](https://pub.dev/documentation/stream_chat_flutter/latest/stream_chat_flutter/MessageSearchListView-class.html)

![](@chat-sdk/flutter/v9-latest/_assets/message_search_list_view.png)

### Background

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 `MessageSearchListView` comes in.

### Basic Example

While the MessageListView is tied to a certain `StreamChannel`, a `MessageSearchListView` is not.

```dart
class MessageSearchPage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: MessageSearchBloc(
        child: MessageSearchListView(
          filters: Filter.in_('members', [StreamChat.of(context).user!.id],),
          messageQuery: 'your query here',
          limit: 20,
        ),
      ),
    );
  }
}
```

### Customize The Result Tiles

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

```dart
MessageSearchListView(
  // ...
  itemBuilder: (context, response) {
    return Text(response.message.text);
  },
),
```

### Show Result Count

You show the number of results via the `showResultCount` parameter.

```dart
MessageSearchListView(
  // ...
  showResultCount: true,
),
```


---

This page was last updated at 2026-06-05T14:24:21.867Z.

For the most recent version of this documentation, visit [https://getstream.io/chat/docs/sdk/flutter/v3/stream-chat-flutter/message-search-list-view/](https://getstream.io/chat/docs/sdk/flutter/v3/stream-chat-flutter/message-search-list-view/).