add presence to example app

This commit is contained in:
Salvatore Giordano
2020-07-08 14:53:02 +02:00
parent 1f226f33c8
commit 86ea7b7e28
+5 -1
View File
@@ -67,7 +67,7 @@ void _initNotifications(Client client) {
void main() async {
final client = Client(
's2dxdhpxd94g',
logLevel: Level.INFO,
logLevel: Level.FINEST,
showLocalNotification: Platform.isAndroid ? showLocalNotification : null,
persistenceEnabled: true,
);
@@ -91,6 +91,7 @@ class MyApp extends StatelessWidget {
Widget build(BuildContext context) {
return MaterialApp(
// debugShowMaterialGrid: true,
// debugShowCheckedModeBanner: false,
theme: ThemeData.light(),
darkTheme: ThemeData.dark(),
themeMode: ThemeMode.system,
@@ -116,6 +117,9 @@ class ChannelListPage extends StatelessWidget {
'\$in': [StreamChat.of(context).user.id],
}
},
options: {
'presence': true,
},
sort: [SortOption('last_message_at')],
pagination: PaginationParams(
limit: 20,