Merge branch 'master' into feature/notifications

This commit is contained in:
Salvatore Giordano
2020-04-03 10:08:26 +02:00
+5 -27
View File
@@ -49,29 +49,21 @@ 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>[
StreamChat(
client: client,
child: Builder(
builder: (context) => ChannelListView(
filter: { filter: {
'members': { 'members': {
'\$in': [StreamChat.of(context).user.id], '\$in': [StreamChat.of(context).user.id],
@@ -83,20 +75,6 @@ class ChannelListPage extends StatelessWidget {
), ),
channelWidget: ChannelPage(), channelWidget: ChannelPage(),
), ),
),
),
StreamChat(
client: client,
child: ChannelListView(
sort: [SortOption('last_message_at')],
pagination: PaginationParams(
limit: 20,
),
channelWidget: ChannelPage(),
),
),
],
),
); );
} }
} }