This commit is contained in:
Salvatore Giordano
2022-05-02 13:15:47 +02:00
parent bd12ece9ea
commit a2e7bc452b
2 changed files with 17 additions and 0 deletions
@@ -168,10 +168,14 @@ Version 4 of the Stream Chat Flutter packages introduces a new controller called
- Return/Create a new channel and start watching it.
- Pause and Resume all subscriptions added to this composite.
For more information see the [`StreamChannelListView` documentation](../stream_chat_flutter/stream_channel_list_view.mdx).
### ChannelsBloc to StreamChannelListController
The `ChannelsBloc` widget should be replaced with `StreamChannelListController`. This controller provides all the functionality needed to query and manipulate channel data previously accessible through `ChannelsBloc`.
For more information see the [`StreamChannelListController` documentation](../stream_chat_flutter_core/stream_channel_list_controller.mdx).
### StreamChannelListView Examples
Let's explore some examples of the functional differences when using the new `StreamChannelListView`.
@@ -280,10 +284,14 @@ Version 4 of the Stream Chat Flutter packages introduces a new controller called
- Load more data using `loadMore`.
- Refresh data.
For more information see the [`StreamMessageSearchListView` documentation](../stream_chat_flutter/stream_message_search_list_view.mdx).
### MessageSearchBloc to StreamMessageSearchListController
The `MessageSearchBloc` widget should be replaced with a `StreamMessageSearchListController`. This controller provides all the functionality needed to query and manipulate message search data previously accessible through `MessageSearchBloc`.
For more information see the [`StreamMessageSearchListController` documentation](../stream_chat_flutter_core/stream_message_search_list_controller.mdx).
### StreamMessageSearchListView Example
The following code demonstrates the old way of searching for messages:
@@ -387,10 +395,14 @@ Version 4 of the Stream Chat Flutter packages introduces a new controller called
- Set filters.
- Refresh data.
For more information see the [`StreamUserListView` documentation](../stream_chat_flutter/stream_user_list_view.mdx).
### UsersBloc to StreamUserListController
The `UsersBloc` widget should be replaced with a `StreamUserListController`. This controller provides all the functionality needed to query and manipulate user data previously accessible through `UsersBloc`.
For more information see the [`StreamUserListController` documentation](../stream_chat_flutter_core/stream_user_list_controller.mdx).
### StreamUserListView Example
The following code demonstrates the old way of displaying all users:
@@ -520,6 +532,8 @@ The following arguments are newly introduced to the `StreamMessageInput`, and ar
- `elevation`: elevation of the **StreamMessageInput** widget
- `shadow`: **Shadow** for the **StreamMessageInput** widget
For more information see the [`StreamMessageInput` documentation](../stream_chat_flutter_core/stream_message_input_controller.mdx).
### StreamMessageInput Examples
Let's explore some examples of the functional differences when using the new `StreamMessageInput`.
@@ -14,6 +14,9 @@ The `StreamChannelListController` is a controller class that allows you to contr
`StreamChannelListController` is a required parameter of the `StreamChannelListView` widget.
Check the [`StreamChannelListView` documentation](../stream_chat_flutter/stream_channel_list_view.mdx) to read more about that.
The `StreamChannelListController` also listens for various events and manipulates the current list of channels accordingly.
Passing a `StreamChannelListEventHandler` to the `StreamChannelListController` will allow you to customize this behaviour.
### Basic Example
Building a custom channel list is a very common task. Here is an example of how to use the `StreamChannelListController` to build a simple list with pagination.