diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock index 7a4583ed..6e34cefa 100644 --- a/example/ios/Podfile.lock +++ b/example/ios/Podfile.lock @@ -267,7 +267,7 @@ SPEC CHECKSUMS: PromisesObjC: c119f3cd559f50b7ae681fa59dc1acd19173b7e6 Protobuf: 176220c526ad8bd09ab1fb40a978eac3fef665f7 ReachabilitySwift: 4032e2f59586e11e3b0ebe15b167abdd587a388b - shared_preferences: 430726339841afefe5142b9c1f50cb6bd7793e01 + shared_preferences: af6bfa751691cdc24be3045c43ec037377ada40d shared_preferences_macos: f3f29b71ccbb56bf40c9dd6396c9acf15e214087 shared_preferences_web: 141cce0c3ed1a1c5bf2a0e44f52d31eeb66e5ea9 sqflite: 4001a31ff81d210346b500c55b17f4d6c7589dd0 diff --git a/example/lib/custom_message.dart b/example/lib/custom_message.dart index 8d9e726a..b084baa2 100644 --- a/example/lib/custom_message.dart +++ b/example/lib/custom_message.dart @@ -50,17 +50,19 @@ class ChannelListPage extends StatelessWidget { @override Widget build(BuildContext context) { return Scaffold( - body: ChannelListView( - filter: { - 'members': { - '\$in': [StreamChat.of(context).user.id], - } - }, - sort: [SortOption('last_message_at')], - pagination: PaginationParams( - limit: 20, + body: ChannelsBloc( + child: ChannelListView( + filter: { + 'members': { + '\$in': [StreamChat.of(context).user.id], + } + }, + sort: [SortOption('last_message_at')], + pagination: PaginationParams( + limit: 20, + ), + channelWidget: ChannelPage(), ), - channelWidget: ChannelPage(), ), ); } diff --git a/example/lib/custom_theme.dart b/example/lib/custom_theme.dart index 078faeb8..afd32ccb 100644 --- a/example/lib/custom_theme.dart +++ b/example/lib/custom_theme.dart @@ -70,17 +70,19 @@ class ChannelListPage extends StatelessWidget { @override Widget build(BuildContext context) { return Scaffold( - body: ChannelListView( - filter: { - 'members': { - '\$in': [StreamChat.of(context).user.id], - } - }, - sort: [SortOption('last_message_at')], - pagination: PaginationParams( - limit: 20, + body: ChannelsBloc( + child: ChannelListView( + filter: { + 'members': { + '\$in': [StreamChat.of(context).user.id], + } + }, + sort: [SortOption('last_message_at')], + pagination: PaginationParams( + limit: 20, + ), + channelWidget: ChannelPage(), ), - channelWidget: ChannelPage(), ), ); } diff --git a/example/lib/customize_channel_preview.dart b/example/lib/customize_channel_preview.dart index b6603f06..6fcb5765 100644 --- a/example/lib/customize_channel_preview.dart +++ b/example/lib/customize_channel_preview.dart @@ -55,18 +55,20 @@ class ChannelListPage extends StatelessWidget { @override Widget build(BuildContext context) { return Scaffold( - body: ChannelListView( - filter: { - 'members': { - '\$in': [StreamChat.of(context).user.id], + body: ChannelsBloc( + child: ChannelListView( + filter: { + 'members': { + '\$in': [StreamChat.of(context).user.id], + }, }, - }, - channelPreviewBuilder: _channelPreviewBuilder, - sort: [SortOption('last_message_at')], - pagination: PaginationParams( - limit: 20, + channelPreviewBuilder: _channelPreviewBuilder, + sort: [SortOption('last_message_at')], + pagination: PaginationParams( + limit: 20, + ), + channelWidget: ChannelPage(), ), - channelWidget: ChannelPage(), ), ); } diff --git a/example/lib/main.dart b/example/lib/main.dart index c2f5336a..d7b905d0 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -65,16 +65,15 @@ void _initNotifications(Client client) { void main() async { final client = Client( - 's2dxdhpxd94g', + 'b67pax5b2wdq', logLevel: Level.INFO, showLocalNotification: Platform.isAndroid ? showLocalNotification : null, ); await client.setUser( - User(id: 'user1'), - 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoidXNlcjEifQ.NGZPyPMx7KSVisJmh4tJhOIv7ZjCaMQpOh4gTINvCaU', + User(id: 'falling-mountain-7'), + 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyX2lkIjoiZmFsbGluZy1tb3VudGFpbi03In0.AKgRXHMQQMz6vJAKszXdY8zMFfsAgkoUeZHlI-Szz9E', ); - _initNotifications(client); runApp(MyApp(client)); diff --git a/example/lib/multiple_conversation.dart b/example/lib/multiple_conversation.dart index 56e5ed1e..8bffa449 100644 --- a/example/lib/multiple_conversation.dart +++ b/example/lib/multiple_conversation.dart @@ -54,17 +54,19 @@ class ChannelListPage extends StatelessWidget { @override Widget build(BuildContext context) { return Scaffold( - body: ChannelListView( - filter: { - 'members': { - '\$in': [StreamChat.of(context).user.id], - } - }, - sort: [SortOption('last_message_at')], - pagination: PaginationParams( - limit: 20, + body: ChannelsBloc( + child: ChannelListView( + filter: { + 'members': { + '\$in': [StreamChat.of(context).user.id], + } + }, + sort: [SortOption('last_message_at')], + pagination: PaginationParams( + limit: 20, + ), + channelWidget: ChannelPage(), ), - channelWidget: ChannelPage(), ), ); } diff --git a/example/lib/threads.dart b/example/lib/threads.dart index 092a5c7f..90e605f6 100644 --- a/example/lib/threads.dart +++ b/example/lib/threads.dart @@ -45,17 +45,19 @@ class ChannelListPage extends StatelessWidget { @override Widget build(BuildContext context) { return Scaffold( - body: ChannelListView( - filter: { - 'members': { - '\$in': [StreamChat.of(context).user.id], - } - }, - sort: [SortOption('last_message_at')], - pagination: PaginationParams( - limit: 20, + body: ChannelsBloc( + child: ChannelListView( + filter: { + 'members': { + '\$in': [StreamChat.of(context).user.id], + } + }, + sort: [SortOption('last_message_at')], + pagination: PaginationParams( + limit: 20, + ), + channelWidget: ChannelPage(), ), - channelWidget: ChannelPage(), ), ); }