From c63e78805725fd6cd061ae1756067da14968d733 Mon Sep 17 00:00:00 2001 From: Deven Joshi Date: Mon, 12 Jul 2021 16:52:08 +0530 Subject: [PATCH] feat: added background to blocs --- .../stream_chat_flutter_core/channels_bloc.mdx | 16 +++++++++++++++- .../message_search_bloc.mdx | 16 +++++++++++++++- .../stream_chat_flutter_core/users_bloc.mdx | 15 ++++++++++++++- 3 files changed, 44 insertions(+), 3 deletions(-) diff --git a/docusaurus/docs/Flutter/stream_chat_flutter_core/channels_bloc.mdx b/docusaurus/docs/Flutter/stream_chat_flutter_core/channels_bloc.mdx index c89668ef..3cb1728a 100644 --- a/docusaurus/docs/Flutter/stream_chat_flutter_core/channels_bloc.mdx +++ b/docusaurus/docs/Flutter/stream_chat_flutter_core/channels_bloc.mdx @@ -4,7 +4,21 @@ sidebar_position: 7 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 Channels with pagination, re-ordering, querying and other operations associated with Channels. diff --git a/docusaurus/docs/Flutter/stream_chat_flutter_core/message_search_bloc.mdx b/docusaurus/docs/Flutter/stream_chat_flutter_core/message_search_bloc.mdx index ad6c7bbe..15f5a6d6 100644 --- a/docusaurus/docs/Flutter/stream_chat_flutter_core/message_search_bloc.mdx +++ b/docusaurus/docs/Flutter/stream_chat_flutter_core/message_search_bloc.mdx @@ -4,7 +4,21 @@ sidebar_position: 8 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. `MessageSearchBloc` can be accessed at anytime by using the static `.of` method diff --git a/docusaurus/docs/Flutter/stream_chat_flutter_core/users_bloc.mdx b/docusaurus/docs/Flutter/stream_chat_flutter_core/users_bloc.mdx index b330b71e..61463599 100644 --- a/docusaurus/docs/Flutter/stream_chat_flutter_core/users_bloc.mdx +++ b/docusaurus/docs/Flutter/stream_chat_flutter_core/users_bloc.mdx @@ -4,7 +4,20 @@ sidebar_position: 9 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 using Flutter's `BuildContext`.