Merge branch 'master' into feature/notifications
This commit is contained in:
+15
-37
@@ -49,53 +49,31 @@ class MyApp extends StatelessWidget {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return MaterialApp(
|
return MaterialApp(
|
||||||
theme: ThemeData(
|
home: Container(
|
||||||
appBarTheme: AppBarTheme(
|
child: StreamChat(
|
||||||
brightness: Brightness.light,
|
client: client,
|
||||||
|
child: ChannelListPage(),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
home: ChannelListPage(client: client),
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class ChannelListPage extends StatelessWidget {
|
class ChannelListPage extends StatelessWidget {
|
||||||
final Client client;
|
|
||||||
ChannelListPage({this.client});
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
body: PageView(
|
body: ChannelListView(
|
||||||
children: <Widget>[
|
filter: {
|
||||||
StreamChat(
|
'members': {
|
||||||
client: client,
|
'\$in': [StreamChat.of(context).user.id],
|
||||||
child: Builder(
|
}
|
||||||
builder: (context) => ChannelListView(
|
},
|
||||||
filter: {
|
sort: [SortOption('last_message_at')],
|
||||||
'members': {
|
pagination: PaginationParams(
|
||||||
'\$in': [StreamChat.of(context).user.id],
|
limit: 20,
|
||||||
}
|
),
|
||||||
},
|
channelWidget: ChannelPage(),
|
||||||
sort: [SortOption('last_message_at')],
|
|
||||||
pagination: PaginationParams(
|
|
||||||
limit: 20,
|
|
||||||
),
|
|
||||||
channelWidget: ChannelPage(),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
StreamChat(
|
|
||||||
client: client,
|
|
||||||
child: ChannelListView(
|
|
||||||
sort: [SortOption('last_message_at')],
|
|
||||||
pagination: PaginationParams(
|
|
||||||
limit: 20,
|
|
||||||
),
|
|
||||||
channelWidget: ChannelPage(),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user