update example

This commit is contained in:
Salvatore Giordano
2022-01-18 16:39:07 +01:00
parent 51e7c873cb
commit 96fae22655
4 changed files with 17 additions and 7 deletions
@@ -62,16 +62,26 @@ class ChannelListPage extends StatelessWidget {
// ignore: prefer_expression_function_bodies
Widget build(BuildContext context) {
return Scaffold(
body: ChannelsBloc(
child: ChannelListView(
body: StreamChannelListView(
controller: StreamChannelListController(
client: StreamChat.of(context).client,
filter: Filter.in_(
'members',
[StreamChat.of(context).currentUser!.id],
),
sort: const [SortOption('last_message_at')],
limit: 20,
channelWidget: const ChannelPage(),
),
onChannelTap: (channel) {
Navigator.of(context).push(
MaterialPageRoute(
builder: (context) => StreamChannel(
channel: channel,
child: const ChannelPage(),
),
),
);
},
),
);
}