Skip to main content
Version: v5


A Widget To Search For Messages Across Channels

Find the documentation here


The StreamMessageSearchGridView widget allows displaying a list of searched messages in a GridView.


Make sure to check the StreamMessageSearchListView documentation to know how to show results in a ListView.

Basic Example

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: StreamMessageSearchGridView(
controller: _controller,
itemBuilder: (context, values, index) {
// return your custom widget here

Did you find this page helpful?