@@ -4,6 +4,20 @@ sidebar_position: 4
|
|||||||
title: ChannelListCore
|
title: ChannelListCore
|
||||||
---
|
---
|
||||||
|
|
||||||
|
A Widget For Building A List Of Channels
|
||||||
|
|
||||||
|
### Background
|
||||||
|
|
||||||
|
The UI SDK of Stream Chat supplies a `ChannelListView` class that builds a list of channels fetching
|
||||||
|
according to the filters and sort order given. However, in some cases, implementing novel UI is necessary
|
||||||
|
that cannot be done using the customization approaches given in the widget.
|
||||||
|
|
||||||
|
To do this, we extracted the logic required for fetching channels into a 'Core' widget - a widget that
|
||||||
|
fetches channels in the expected way via the usual params but does not supply any UI and instead
|
||||||
|
exposes builders to build the UI in situations such as loading, empty data, errors, and on data received.
|
||||||
|
|
||||||
|
### Basic Example
|
||||||
|
|
||||||
`ChannelListCore` is a simplified class that allows fetching a list of
|
`ChannelListCore` is a simplified class that allows fetching a list of
|
||||||
channels while exposing UI builders.
|
channels while exposing UI builders.
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,21 @@ sidebar_position: 7
|
|||||||
title: ChannelsBloc
|
title: ChannelsBloc
|
||||||
---
|
---
|
||||||
|
|
||||||
`ChannelsBloc` is a widget dedicated to the management of a channel list with pagination.
|
A Widget Dedicated To The Management Of A Channel List With Pagination.
|
||||||
|
|
||||||
|
### Background
|
||||||
|
|
||||||
|
Most widgets in the Core SDK are focused on fetching a particular type of object from Stream Chat - channels,
|
||||||
|
messages, users, etc. The BLoC widgets bundle up the base functions used to fetch data as well as the current
|
||||||
|
data fetched by the respective functions. Furthermore, the Core widgets use this BLoC to fetch new or
|
||||||
|
existing data and build UI based on it.
|
||||||
|
|
||||||
|
All Core and UI widgets which focus on fetching a list of objects need to have their respective functions
|
||||||
|
above them in the widget tree. The ChannelListCore and ChannelListView require the ChannelsBloc
|
||||||
|
above them in the widget hierarchy without which they will fail.
|
||||||
|
|
||||||
|
### Understanding The Widget
|
||||||
|
|
||||||
`ChannelsBloc` is used together with `ChannelListCore` to manage a list of
|
`ChannelsBloc` is used together with `ChannelListCore` to manage a list of
|
||||||
Channels with pagination, re-ordering, querying and other operations
|
Channels with pagination, re-ordering, querying and other operations
|
||||||
associated with Channels.
|
associated with Channels.
|
||||||
|
|||||||
@@ -4,6 +4,20 @@ sidebar_position: 5
|
|||||||
title: MessageListCore
|
title: MessageListCore
|
||||||
---
|
---
|
||||||
|
|
||||||
|
A Widget For Building A List Of Messages
|
||||||
|
|
||||||
|
### Background
|
||||||
|
|
||||||
|
The UI SDK of Stream Chat supplies a `MessageListView` class that builds a list of channels fetching
|
||||||
|
according to the filters and sort order given. However, in some cases, implementing novel UI is necessary
|
||||||
|
that cannot be done using the customization approaches given in the widget.
|
||||||
|
|
||||||
|
To do this, we extracted the logic required for fetching channels into a 'Core' widget - a widget that
|
||||||
|
fetches channels in the expected way via the usual params but does not supply any UI and instead
|
||||||
|
exposes builders to build the UI in situations such as loading, empty data, errors, and on data received.
|
||||||
|
|
||||||
|
### Basic Example
|
||||||
|
|
||||||
`MessageListCore` is a simplified class that allows fetching a list of
|
`MessageListCore` is a simplified class that allows fetching a list of
|
||||||
messages while exposing UI builders.
|
messages while exposing UI builders.
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,21 @@ sidebar_position: 8
|
|||||||
title: MessageSearchListBloc
|
title: MessageSearchListBloc
|
||||||
---
|
---
|
||||||
|
|
||||||
`MessageSearchBloc` is used to manage a list of messages with pagination.
|
A Widget Used To Manage A List Of Messages With Pagination.
|
||||||
|
|
||||||
|
### Background
|
||||||
|
|
||||||
|
Most widgets in the Core SDK are focused on fetching a particular type of object from Stream Chat - channels,
|
||||||
|
messages, users etc. The BLoC widgets bundle up the base functions used to fetch data as well as the current
|
||||||
|
data fetched by the respective functions. Furthermore, the Core widgets use this BLoC to fetch new or
|
||||||
|
existing data and build UI based on it.
|
||||||
|
|
||||||
|
All Core and UI widgets which focus on fetching a list of objects need to have their respective functions
|
||||||
|
above them in the widget tree. The MessageSearchListCore and MessageSearchListView require the
|
||||||
|
MessageSearchListCore above them in the widget hierarchy without which they will fail.
|
||||||
|
|
||||||
|
### Understanding The Widget
|
||||||
|
|
||||||
This class can be used to load messages, perform queries, etc.
|
This class can be used to load messages, perform queries, etc.
|
||||||
|
|
||||||
`MessageSearchBloc` can be accessed at anytime by using the static `.of` method
|
`MessageSearchBloc` can be accessed at anytime by using the static `.of` method
|
||||||
|
|||||||
@@ -4,6 +4,19 @@ sidebar_position: 6
|
|||||||
title: MessageSearchListCore
|
title: MessageSearchListCore
|
||||||
---
|
---
|
||||||
|
|
||||||
|
A Widget For Displaying Message Searches
|
||||||
|
|
||||||
|
### Background
|
||||||
|
|
||||||
|
The UI SDK of Stream Chat supplies a `MessageSearchListView` class that builds a list of channels fetching
|
||||||
|
according to the filters and sort order given. However, in some cases, implementing novel UI is necessary
|
||||||
|
that cannot be done using the customization approaches given in the widget.
|
||||||
|
|
||||||
|
To do this, we extracted the logic required for fetching channels into a 'Core' widget - a widget that
|
||||||
|
fetches channels in the expected way via the usual params but does not supply any UI and instead
|
||||||
|
exposes builders to build the UI in situations such as loading, empty data, errors, and on data received.
|
||||||
|
|
||||||
|
### Basic Example
|
||||||
|
|
||||||
`MessageSearchListCore` is a simplified class that allows searching for
|
`MessageSearchListCore` is a simplified class that allows searching for
|
||||||
messages across channels while exposing UI builders.
|
messages across channels while exposing UI builders.
|
||||||
|
|||||||
@@ -3,3 +3,18 @@ id: user_list_core
|
|||||||
sidebar_position: 10
|
sidebar_position: 10
|
||||||
title: UserListCore
|
title: UserListCore
|
||||||
---
|
---
|
||||||
|
|
||||||
|
A Widget For Building A List Of Users
|
||||||
|
|
||||||
|
### Background
|
||||||
|
|
||||||
|
The UI SDK of Stream Chat supplies a `UserListView` class that builds a list of channels fetching
|
||||||
|
according to the filters and sort order given. However, in some cases, implementing novel UI is necessary
|
||||||
|
that cannot be done using the customization approaches given in the widget.
|
||||||
|
|
||||||
|
To do this, we extracted the logic required for fetching channels into a 'Core' widget - a widget that
|
||||||
|
fetches channels in the expected way via the usual params but does not supply any UI and instead
|
||||||
|
exposes builders to build the UI in situations such as loading, empty data, errors, and on data received.
|
||||||
|
|
||||||
|
### Basic Example
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,20 @@ sidebar_position: 9
|
|||||||
title: UsersBloc
|
title: UsersBloc
|
||||||
---
|
---
|
||||||
|
|
||||||
Widget dedicated to the management of a users list with pagination.
|
A Widget Dedicated To The Management Of A Users List With Pagination.
|
||||||
|
|
||||||
|
### Background
|
||||||
|
|
||||||
|
Most widgets in the Core SDK are focused on fetching a particular type of object from Stream Chat - channels,
|
||||||
|
messages, users, etc. The BLoC widgets bundle up the base functions used to fetch data as well as the current
|
||||||
|
data fetched by the respective functions. Furthermore, the Core widgets use this BLoC to fetch new or
|
||||||
|
existing data and build UI based on it.
|
||||||
|
|
||||||
|
All Core and UI widgets which focus on fetching a list of objects need to have their respective functions
|
||||||
|
above them in the widget tree. The UserListCore and UserListView require the UserListCore
|
||||||
|
above them in the widget hierarchy without which they will fail.
|
||||||
|
|
||||||
|
### Understanding The Widget
|
||||||
|
|
||||||
`UsersBloc` can be accessed at anytime by using the static `.of` method
|
`UsersBloc` can be accessed at anytime by using the static `.of` method
|
||||||
using Flutter's `BuildContext`.
|
using Flutter's `BuildContext`.
|
||||||
|
|||||||
Reference in New Issue
Block a user