remove channels bloc

This commit is contained in:
Salvatore Giordano
2020-04-07 10:14:00 +02:00
parent fa2be8397d
commit dc90e38743
4 changed files with 130 additions and 123 deletions
+28 -19
View File
@@ -50,39 +50,48 @@ class MyApp extends StatelessWidget {
Widget build(BuildContext context) {
return MaterialApp(
home: Container(
child: StreamChat(
client: client,
child: ChannelListPage(),
),
child: ChannelListPage(client),
),
);
}
}
class ChannelListPage extends StatelessWidget {
final Client client;
ChannelListPage(this.client);
@override
Widget build(BuildContext context) {
return Scaffold(
body: PageView(
children: <Widget>[
ChannelListView(
filter: {
'members': {
'\$in': [StreamChat.of(context).user.id],
}
},
sort: [SortOption('last_message_at')],
pagination: PaginationParams(
limit: 20,
StreamChat(
client: client,
child: Builder(
builder: (context) => ChannelListView(
filter: {
'members': {
'\$in': [StreamChat.of(context).user.id],
}
},
sort: [SortOption('last_message_at')],
pagination: PaginationParams(
limit: 20,
),
channelWidget: ChannelPage(),
),
),
channelWidget: ChannelPage(),
),
ChannelListView(
sort: [SortOption('last_message_at')],
pagination: PaginationParams(
limit: 20,
StreamChat(
client: client,
child: ChannelListView(
sort: [SortOption('last_message_at')],
pagination: PaginationParams(
limit: 20,
),
channelWidget: ChannelPage(),
),
channelWidget: ChannelPage(),
),
],
),