From 5ae99333219a95c5c24216dd4cfcaa54e1add535 Mon Sep 17 00:00:00 2001 From: Deven Joshi Date: Fri, 16 Jul 2021 18:47:02 +0530 Subject: [PATCH 01/24] feat: Added mig guide (scf) --- .../guides/adding_custom_attachments.mdx | 2 +- .../Flutter/guides/migration_guide_2_0.mdx | 146 ++++++++++++++++++ 2 files changed, 147 insertions(+), 1 deletion(-) create mode 100644 docusaurus/docs/Flutter/guides/migration_guide_2_0.mdx diff --git a/docusaurus/docs/Flutter/guides/adding_custom_attachments.mdx b/docusaurus/docs/Flutter/guides/adding_custom_attachments.mdx index fb1f7bbe..0c427713 100644 --- a/docusaurus/docs/Flutter/guides/adding_custom_attachments.mdx +++ b/docusaurus/docs/Flutter/guides/adding_custom_attachments.mdx @@ -1,6 +1,6 @@ --- id: adding_custom_attachments -sidebar_position: 3 +sidebar_position: 4 title: Adding Custom Attachments --- diff --git a/docusaurus/docs/Flutter/guides/migration_guide_2_0.mdx b/docusaurus/docs/Flutter/guides/migration_guide_2_0.mdx new file mode 100644 index 00000000..58e4b828 --- /dev/null +++ b/docusaurus/docs/Flutter/guides/migration_guide_2_0.mdx @@ -0,0 +1,146 @@ +--- +id: mig_guide_2_0 +sidebar_position: 5 +title: Migrating to 2.0 (Null-safety) +--- + +A Migration Guide For Switching To v2.0 Of The Flutter SDK + +### Overview + +v2.0 of the Stream Chat Flutter SDK brings along several changes - primarily making the SDK null-safe. +Null safety allows your apps to run faster, with fewer errors, and with less code. + +Check [this link](https://flutter.dev/docs/null-safety) for more about Null Safety in Flutter. + +This guide is intended to enumerate and better explain the changes in the SDK. + +The changes will be listed by package and a concise changelog will be followed by more info. + +### Changelog of `stream_chat_flutter` + +#### Breaking Changes from 1.5.4 + +*Migrate this package to null safety + +*Renamed ChannelImage to ChannelAvatar + +*Updated StreamChatThemeData.reactionIcons to accept custom builder + +*Renamed ColorTheme properties to reflect the purpose of the colors + + *ColorTheme.black -> ColorTheme.textHighEmphasis + *ColorTheme.grey -> ColorTheme.textLowEmphasis + *ColorTheme.greyGainsboro -> ColorTheme.disabled + *ColorTheme.greyWhisper -> ColorTheme.borders + *ColorTheme.whiteSmoke -> ColorTheme.inputBg + *ColorTheme.whiteSnow -> ColorTheme.appBg + *ColorTheme.white -> ColorTheme.barsBg + *ColorTheme.blueAlice -> ColorTheme.linkBg + *ColorTheme.accentBlue -> ColorTheme.accentPrimary + *ColorTheme.accentRed -> ColorTheme.accentError + *ColorTheme.accentGreen -> ColorTheme.accentInfo + +*ChannelListCore options property is removed in favor of individual properties + + *options.state -> bool state + *options.watch -> bool watch + *options.presence -> bool presence + +*UserListView options property is removed in favor of individual properties + + *options.presence -> bool presence + +*Renamed ImageHeader to GalleryHeader + +*Renamed ImageFooter to GalleryFooter + +*MessageBuilder and ParentMessageBuilder signature is now + +``` +typedef MessageBuilder = Widget Function( + BuildContext, + MessageDetails, + List, + MessageWidget defaultMessageWidget, + ); +``` + +The last parameter is the default MessageWidget +You can call .copyWith to customize just a subset of properties + +#### ✅ Added + +Added video compress options (frame and quality) to MessageInput +TypingIndicator now has a property called parentId to show typing indicator specific to threads +#493: add support for messageListView header/footer +MessageWidget accepts a userAvatarBuilder +Added pinMessage ui support +Added MessageListView.threadSeparatorBuilder property +Added MessageInput.onError property to allow error handling +Added GalleryHeader/GalleryFooter theme classes + +#### 🐞 Fixed + +#483: Keyboard covers input text box when editing +message +Modals are shown using the nearest Navigator to make using the SDK easier in a nested navigator use case +#484: messages don't update without a reload +MessageListView not rendering if the user is not a member of the channel +Fix MessageInput overflow when there are no actions +Minor fixes and improvements + +### Migrating to 2.0 for `stream_chat_flutter` + +:::note +If you are migrating your full Flutter project to null-safety, first make sure you follow the +instructions from the [official Null Safety migration guide](https://dart.dev/null-safety/migration-guide). +::: + +To migrate to v2.0 for `stream_chat_flutter`, first change the version of the package to the latest +null-safe version. + +```yaml +dependencies: + stream_chat_flutter: ^2.0.0 +``` + +Upon doing this, all breaking changes from the package will take immediate effect. Here are steps to +remedy the issue: + +1) Replace the offending class names with the revised class names + + * ChannelImage -> ChannelAvatar + * ImageHeader -> GalleryHeader + * ImageFooter -> GalleryFooter + +2) The new version comes with revised color names since the previous names do not suit light/dark mode +nomenclature. Make sure any old colors used from theme are changed over to the new theme color names: + + *ColorTheme.black -> ColorTheme.textHighEmphasis + *ColorTheme.grey -> ColorTheme.textLowEmphasis + *ColorTheme.greyGainsboro -> ColorTheme.disabled + *ColorTheme.greyWhisper -> ColorTheme.borders + *ColorTheme.whiteSmoke -> ColorTheme.inputBg + *ColorTheme.whiteSnow -> ColorTheme.appBg + *ColorTheme.white -> ColorTheme.barsBg + *ColorTheme.blueAlice -> ColorTheme.linkBg + *ColorTheme.accentBlue -> ColorTheme.accentPrimary + *ColorTheme.accentRed -> ColorTheme.accentError + *ColorTheme.accentGreen -> ColorTheme.accentInfo + +3) We decided to make messages easier to customize and now supply the default implementation of the +messages in the builder - so you can now customize a single parameter without having to redo the +entire implementation. Please reform your builders to take into account the new format: + +``` +typedef MessageBuilder = Widget Function( + BuildContext, + MessageDetails, + List, + MessageWidget defaultMessageWidget, + ); +``` + +Use `defaultMessageWidget.copyWith()` to edit any properties to make it much simpler to tweak the +default implementation. \ No newline at end of file From 9bf0aac3fa80d93539873ca2153aad6f2c50deeb Mon Sep 17 00:00:00 2001 From: Deven Joshi Date: Fri, 16 Jul 2021 19:12:30 +0530 Subject: [PATCH 02/24] feat: Added mig guide (scfc) --- .../Flutter/guides/migration_guide_2_0.mdx | 167 ++++++++++++++---- 1 file changed, 130 insertions(+), 37 deletions(-) diff --git a/docusaurus/docs/Flutter/guides/migration_guide_2_0.mdx b/docusaurus/docs/Flutter/guides/migration_guide_2_0.mdx index 58e4b828..b71c48b3 100644 --- a/docusaurus/docs/Flutter/guides/migration_guide_2_0.mdx +++ b/docusaurus/docs/Flutter/guides/migration_guide_2_0.mdx @@ -19,43 +19,43 @@ The changes will be listed by package and a concise changelog will be followed b ### Changelog of `stream_chat_flutter` -#### Breaking Changes from 1.5.4 +#### 🛑️ Breaking Changes from 1.5.4 -*Migrate this package to null safety +* Migrate this package to null safety -*Renamed ChannelImage to ChannelAvatar +* Renamed ChannelImage to ChannelAvatar -*Updated StreamChatThemeData.reactionIcons to accept custom builder +* Updated StreamChatThemeData.reactionIcons to accept custom builder -*Renamed ColorTheme properties to reflect the purpose of the colors +* Renamed ColorTheme properties to reflect the purpose of the colors - *ColorTheme.black -> ColorTheme.textHighEmphasis - *ColorTheme.grey -> ColorTheme.textLowEmphasis - *ColorTheme.greyGainsboro -> ColorTheme.disabled - *ColorTheme.greyWhisper -> ColorTheme.borders - *ColorTheme.whiteSmoke -> ColorTheme.inputBg - *ColorTheme.whiteSnow -> ColorTheme.appBg - *ColorTheme.white -> ColorTheme.barsBg - *ColorTheme.blueAlice -> ColorTheme.linkBg - *ColorTheme.accentBlue -> ColorTheme.accentPrimary - *ColorTheme.accentRed -> ColorTheme.accentError - *ColorTheme.accentGreen -> ColorTheme.accentInfo + * ColorTheme.black -> ColorTheme.textHighEmphasis + * ColorTheme.grey -> ColorTheme.textLowEmphasis + * ColorTheme.greyGainsboro -> ColorTheme.disabled + * ColorTheme.greyWhisper -> ColorTheme.borders + * ColorTheme.whiteSmoke -> ColorTheme.inputBg + * ColorTheme.whiteSnow -> ColorTheme.appBg + * ColorTheme.white -> ColorTheme.barsBg + * ColorTheme.blueAlice -> ColorTheme.linkBg + * ColorTheme.accentBlue -> ColorTheme.accentPrimary + * ColorTheme.accentRed -> ColorTheme.accentError + * ColorTheme.accentGreen -> ColorTheme.accentInfo -*ChannelListCore options property is removed in favor of individual properties +* ChannelListCore options property is removed in favor of individual properties - *options.state -> bool state - *options.watch -> bool watch - *options.presence -> bool presence + *options.state -> bool state + *options.watch -> bool watch + *options.presence -> bool presence -*UserListView options property is removed in favor of individual properties +* UserListView options property is removed in favor of individual properties - *options.presence -> bool presence + *options.presence -> bool presence -*Renamed ImageHeader to GalleryHeader +* Renamed ImageHeader to GalleryHeader -*Renamed ImageFooter to GalleryFooter +* Renamed ImageFooter to GalleryFooter -*MessageBuilder and ParentMessageBuilder signature is now +* MessageBuilder and ParentMessageBuilder signature is now ``` typedef MessageBuilder = Widget Function( @@ -117,17 +117,17 @@ remedy the issue: 2) The new version comes with revised color names since the previous names do not suit light/dark mode nomenclature. Make sure any old colors used from theme are changed over to the new theme color names: - *ColorTheme.black -> ColorTheme.textHighEmphasis - *ColorTheme.grey -> ColorTheme.textLowEmphasis - *ColorTheme.greyGainsboro -> ColorTheme.disabled - *ColorTheme.greyWhisper -> ColorTheme.borders - *ColorTheme.whiteSmoke -> ColorTheme.inputBg - *ColorTheme.whiteSnow -> ColorTheme.appBg - *ColorTheme.white -> ColorTheme.barsBg - *ColorTheme.blueAlice -> ColorTheme.linkBg - *ColorTheme.accentBlue -> ColorTheme.accentPrimary - *ColorTheme.accentRed -> ColorTheme.accentError - *ColorTheme.accentGreen -> ColorTheme.accentInfo + * ColorTheme.black -> ColorTheme.textHighEmphasis + * ColorTheme.grey -> ColorTheme.textLowEmphasis + * ColorTheme.greyGainsboro -> ColorTheme.disabled + * ColorTheme.greyWhisper -> ColorTheme.borders + * ColorTheme.whiteSmoke -> ColorTheme.inputBg + * ColorTheme.whiteSnow -> ColorTheme.appBg + * ColorTheme.white -> ColorTheme.barsBg + * ColorTheme.blueAlice -> ColorTheme.linkBg + * ColorTheme.accentBlue -> ColorTheme.accentPrimary + * ColorTheme.accentRed -> ColorTheme.accentError + * ColorTheme.accentGreen -> ColorTheme.accentInfo 3) We decided to make messages easier to customize and now supply the default implementation of the messages in the builder - so you can now customize a single parameter without having to redo the @@ -143,4 +143,97 @@ typedef MessageBuilder = Widget Function( ``` Use `defaultMessageWidget.copyWith()` to edit any properties to make it much simpler to tweak the -default implementation. \ No newline at end of file +default implementation. + +### Changelog of `stream_chat_flutter_core` + +#### 🛑️ Breaking Changes from 1.5.3 + +* Migrate this package to null safety +* channelsBloc.queryChannels(), ChannelListCore options param/property is removed in favor of individual params/properties + * options.state -> bool state + * options.watch -> bool watch + * options.presence -> bool presence +* usersBloc.queryUsers(), UserListCore options param/property is removed in favor of individual params/properties + * options.presence -> bool presence + +#### ✅ Added + +* Monitor connection using connectivity_plus package + +#### 🐞 Fixed + +* Minor fixes +* Performance improvements + +### Migrating to 2.0 for `stream_chat_flutter_core` + +If you are migrating your full Flutter project to null-safety, first make sure you follow the +instructions from the [official Null Safety migration guide](https://dart.dev/null-safety/migration-guide). +::: + +To migrate to v2.0 for `stream_chat_flutter_core`, first change the version of the package to the latest +null-safe version. + +```yaml +dependencies: + stream_chat_flutter_core: ^2.0.0 +``` + +Upon doing this, all breaking changes from the package will take immediate effect. Here are steps to +remedy the issue: + +:::note +The major changes in `stream_chat_flutter_core` consist of changing over from a map full of options +to a more type safe and sound approach by changing over to explicit parameters. +::: + +1) Change over Core widget implementations by using the explicit parameters instead of the options map. +Use these explicit parameters in the widget constructor instead of the option keys: + + * options.state -> bool state + * options.watch -> bool watch + * options.presence -> bool presence + +2) Change over query calls in the BLoCs in the same way (change from options map to explicit parameters +in the constructor) + +### Changelog of `stream_chat` + +#### 🛑️ Breaking Changes from 1.5.3 + +* Migrate this package to null safety +* ConnectUserWithProvider now requires tokenProvider as a required param. (Removed from the constructor) +* client.disconnect() is now divided into two different functions +* client.closeConnection() -> for closing user websocket connection. +* client.disconnectUser() -> for disconnecting user and resetting client state. +* client.devToken() now returns a Token model instead of String. +* ApiError is removed in favor of StreamChatError +* StreamChatError -> parent type for all the stream errors. +* StreamWebSocketError -> for user websocket related errors. +* StreamChatNetworkError -> for network related errors. +* client.queryChannels(), channel.query() options param is removed in favor of individual params +* option.state -> bool state +* option.watch -> bool watch +* option.presence -> bool presence +* client.queryUsers() options param is removed in favor of individual params +* option.presence -> bool presence +* Migrate this package to null safety +* Added typed filters + +#### 🐞 Fixed + +* #369: Client does not return without internet connection +* several minor fixes +* performance improvements + +#### ✅ Added + +* New Location enum is introduced for easily changing the client location/baseUrl. +* New client.openConnection() and client.closeConnection() is introduced to connect/disconnect user ws connection. +* New client.partialUpdateMessage and channel.partialUpdateMessage methods +* connectWebSocket parameter in connect user calls to use the client in "connection-less" mode. + +#### 🔄 Changed + +* baseURL is now deprecated in favor of using Location to change data location. From cc76c3b8ff5b24780f81cfdf0a6bd782c3d45336 Mon Sep 17 00:00:00 2001 From: Deven Joshi Date: Fri, 16 Jul 2021 19:59:11 +0530 Subject: [PATCH 03/24] feat: Added mig guide (sc) --- .../Flutter/guides/migration_guide_2_0.mdx | 79 ++++++++++++++++--- 1 file changed, 69 insertions(+), 10 deletions(-) diff --git a/docusaurus/docs/Flutter/guides/migration_guide_2_0.mdx b/docusaurus/docs/Flutter/guides/migration_guide_2_0.mdx index b71c48b3..a2f509a8 100644 --- a/docusaurus/docs/Flutter/guides/migration_guide_2_0.mdx +++ b/docusaurus/docs/Flutter/guides/migration_guide_2_0.mdx @@ -205,20 +205,19 @@ in the constructor) * Migrate this package to null safety * ConnectUserWithProvider now requires tokenProvider as a required param. (Removed from the constructor) * client.disconnect() is now divided into two different functions -* client.closeConnection() -> for closing user websocket connection. -* client.disconnectUser() -> for disconnecting user and resetting client state. + * client.closeConnection() -> for closing user websocket connection. + * client.disconnectUser() -> for disconnecting user and resetting client state. * client.devToken() now returns a Token model instead of String. * ApiError is removed in favor of StreamChatError -* StreamChatError -> parent type for all the stream errors. -* StreamWebSocketError -> for user websocket related errors. -* StreamChatNetworkError -> for network related errors. + * StreamChatError -> parent type for all the stream errors. + * StreamWebSocketError -> for user websocket related errors. + * StreamChatNetworkError -> for network related errors. * client.queryChannels(), channel.query() options param is removed in favor of individual params -* option.state -> bool state -* option.watch -> bool watch -* option.presence -> bool presence + * option.state -> bool state + * option.watch -> bool watch + * option.presence -> bool presence * client.queryUsers() options param is removed in favor of individual params -* option.presence -> bool presence -* Migrate this package to null safety + * option.presence -> bool presence * Added typed filters #### 🐞 Fixed @@ -237,3 +236,63 @@ in the constructor) #### 🔄 Changed * baseURL is now deprecated in favor of using Location to change data location. + +### Migrating to 2.0 for `stream_chat` + +If you are migrating your full Flutter project to null-safety, first make sure you follow the +instructions from the [official Null Safety migration guide](https://dart.dev/null-safety/migration-guide). +::: + +To migrate to v2.0 for `stream_chat`, first change the version of the package to the latest +null-safe version. + +```yaml +dependencies: + stream_chat: ^2.0.0 +``` + +Upon doing this, all breaking changes from the package will take immediate effect. Here are steps to +remedy the issue: + +1) Change over the constructor of `connectUserWithProvider()` to the new format. + +2) We added more nuance to the `disconnectUser` by adding two new methods - one to close the connection +and the other to disconnect the user. This allows more fine-grained control for diconnection. + + * client.closeConnection() -> for closing user websocket connection. + * client.disconnectUser() -> for disconnecting user and resetting client state. + +3) We refactored how we handle errors - new error types are now introduced instead of ApiError. + + * StreamChatError -> parent type for all the stream errors. + * StreamWebSocketError -> for user websocket related errors. + * StreamChatNetworkError -> for network related errors. + +4) We changed over from a map full of options to a more type safe and sound approach by changing over to explicit parameters. + +Use these explicit parameters in the query parameters instead of the option keys: + +* client.queryChannels(), channel.query() options param is removed in favor of individual params + * option.state -> bool state + * option.watch -> bool watch + * option.presence -> bool presence +* client.queryUsers() options param is removed in favor of individual params + * option.presence -> bool presence + +5) We added type safe filters to make filtering in the app easier. + +As an example, in the old app this filter: + +``` + filter: { + 'members': { + '\$in': [StreamChat.of(context).user.id], + } + }, +``` + +Would turn into: + +``` + filter: Filter.in_('members', [StreamChat.of(context).user.id]) +``` \ No newline at end of file From 9c4216d9767654c92565861d1f8e2ef8538906ad Mon Sep 17 00:00:00 2001 From: Deven Joshi Date: Fri, 16 Jul 2021 20:00:22 +0530 Subject: [PATCH 04/24] fix: fmt --- docusaurus/docs/Flutter/guides/migration_guide_2_0.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docusaurus/docs/Flutter/guides/migration_guide_2_0.mdx b/docusaurus/docs/Flutter/guides/migration_guide_2_0.mdx index a2f509a8..470b1004 100644 --- a/docusaurus/docs/Flutter/guides/migration_guide_2_0.mdx +++ b/docusaurus/docs/Flutter/guides/migration_guide_2_0.mdx @@ -283,7 +283,7 @@ Use these explicit parameters in the query parameters instead of the option keys As an example, in the old app this filter: -``` +```dart filter: { 'members': { '\$in': [StreamChat.of(context).user.id], @@ -293,6 +293,6 @@ As an example, in the old app this filter: Would turn into: -``` +```dart filter: Filter.in_('members', [StreamChat.of(context).user.id]) ``` \ No newline at end of file From 4d1625c306ff0349803188c62a869924be7a3b62 Mon Sep 17 00:00:00 2001 From: Deven Joshi Date: Fri, 16 Jul 2021 20:01:35 +0530 Subject: [PATCH 05/24] fix: details --- docusaurus/docs/Flutter/guides/migration_guide_2_0.mdx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docusaurus/docs/Flutter/guides/migration_guide_2_0.mdx b/docusaurus/docs/Flutter/guides/migration_guide_2_0.mdx index 470b1004..79bbaeb5 100644 --- a/docusaurus/docs/Flutter/guides/migration_guide_2_0.mdx +++ b/docusaurus/docs/Flutter/guides/migration_guide_2_0.mdx @@ -279,7 +279,8 @@ Use these explicit parameters in the query parameters instead of the option keys * client.queryUsers() options param is removed in favor of individual params * option.presence -> bool presence -5) We added type safe filters to make filtering in the app easier. +5) We added type safe filters to make filtering in the app easier. Change over the filters to the +new implementation. As an example, in the old app this filter: From 0bc3efdeccdf86635e5161658b3ac13f33cecf8c Mon Sep 17 00:00:00 2001 From: Deven Joshi Date: Fri, 16 Jul 2021 20:02:01 +0530 Subject: [PATCH 06/24] fix: details --- docusaurus/docs/Flutter/guides/migration_guide_2_0.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docusaurus/docs/Flutter/guides/migration_guide_2_0.mdx b/docusaurus/docs/Flutter/guides/migration_guide_2_0.mdx index 79bbaeb5..124fe247 100644 --- a/docusaurus/docs/Flutter/guides/migration_guide_2_0.mdx +++ b/docusaurus/docs/Flutter/guides/migration_guide_2_0.mdx @@ -256,7 +256,7 @@ remedy the issue: 1) Change over the constructor of `connectUserWithProvider()` to the new format. -2) We added more nuance to the `disconnectUser` by adding two new methods - one to close the connection +2) We added more nuance to the `disconnectUser()` by adding two new methods - one to close the connection and the other to disconnect the user. This allows more fine-grained control for diconnection. * client.closeConnection() -> for closing user websocket connection. From 1e54f1198b4b19c6d13e9857c706ec82bae9e27d Mon Sep 17 00:00:00 2001 From: Salvatore Giordano Date: Fri, 16 Jul 2021 16:48:10 +0200 Subject: [PATCH 07/24] replace summary with bold --- docusaurus/docs/Flutter/basics/choose_package.mdx | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/docusaurus/docs/Flutter/basics/choose_package.mdx b/docusaurus/docs/Flutter/basics/choose_package.mdx index 7a4961c5..8be73f01 100644 --- a/docusaurus/docs/Flutter/basics/choose_package.mdx +++ b/docusaurus/docs/Flutter/basics/choose_package.mdx @@ -28,9 +28,10 @@ to match your app colors and such. If you require any additional feature or cust to request this through our support channels. ::: -:::summary +Summary: + For the quickest and easiest way to add Chat to your app with prebuilt UI components, use stream_chat_flutter -::: + #### The case for stream_chat_flutter_core @@ -39,9 +40,9 @@ strips away the UI associated with the components and provides the data fetching capabilities while supplying builders for UI. This allows you to implement your own UI and themes completely independently while not worrying about writing functions for data and pagination. -:::summary +Summary: + For implementing your own custom UI while not having to worry about lower level API calls, use stream_chat_flutter_core. -::: #### The case for stream_chat @@ -49,6 +50,6 @@ The stream_chat package is the Low-level Client (LLC) of Stream Chat in Flutter. the underlying functionality of Stream Chat and allows the most customization in terms of UI, data, and architecture. -:::summary +Summary: + For the most control over the SDK and dealing with low level calls to the API, use stream_chat. -::: \ No newline at end of file From a9c9d40ba5924813e8274f7e5cb75ed4c5fe3828 Mon Sep 17 00:00:00 2001 From: Deven Joshi Date: Fri, 16 Jul 2021 20:24:50 +0530 Subject: [PATCH 08/24] fix: details --- .../Flutter/guides/migration_guide_2_0.mdx | 174 +++++++++--------- 1 file changed, 87 insertions(+), 87 deletions(-) diff --git a/docusaurus/docs/Flutter/guides/migration_guide_2_0.mdx b/docusaurus/docs/Flutter/guides/migration_guide_2_0.mdx index 124fe247..4b8662ac 100644 --- a/docusaurus/docs/Flutter/guides/migration_guide_2_0.mdx +++ b/docusaurus/docs/Flutter/guides/migration_guide_2_0.mdx @@ -23,39 +23,39 @@ The changes will be listed by package and a concise changelog will be followed b * Migrate this package to null safety -* Renamed ChannelImage to ChannelAvatar +* Renamed `ChannelImage` to `ChannelAvatar` -* Updated StreamChatThemeData.reactionIcons to accept custom builder +* Updated `StreamChatThemeData.reactionIcons` to accept custom builder * Renamed ColorTheme properties to reflect the purpose of the colors - * ColorTheme.black -> ColorTheme.textHighEmphasis - * ColorTheme.grey -> ColorTheme.textLowEmphasis - * ColorTheme.greyGainsboro -> ColorTheme.disabled - * ColorTheme.greyWhisper -> ColorTheme.borders - * ColorTheme.whiteSmoke -> ColorTheme.inputBg - * ColorTheme.whiteSnow -> ColorTheme.appBg - * ColorTheme.white -> ColorTheme.barsBg - * ColorTheme.blueAlice -> ColorTheme.linkBg - * ColorTheme.accentBlue -> ColorTheme.accentPrimary - * ColorTheme.accentRed -> ColorTheme.accentError - * ColorTheme.accentGreen -> ColorTheme.accentInfo + * `ColorTheme.black` -> `ColorTheme.textHighEmphasis` + * `ColorTheme.grey` -> `ColorTheme.textLowEmphasis` + * `ColorTheme.greyGainsboro` -> `ColorTheme.disabled` + * `ColorTheme.greyWhisper` -> `ColorTheme.borders` + * `ColorTheme.whiteSmoke` -> `ColorTheme.inputBg` + * `ColorTheme.whiteSnow` -> `ColorTheme.appBg` + * `ColorTheme.white` -> `ColorTheme.barsBg` + * `ColorTheme.blueAlice` -> `ColorTheme.linkBg` + * `ColorTheme.accentBlue` -> `ColorTheme.accentPrimary` + * `ColorTheme.accentRed` -> `ColorTheme.accentError` + * `ColorTheme.accentGreen` -> `ColorTheme.accentInfo` -* ChannelListCore options property is removed in favor of individual properties +* `ChannelListCore` options property is removed in favor of individual properties - *options.state -> bool state - *options.watch -> bool watch - *options.presence -> bool presence + * `options.state` -> `bool state` + * `options.watch` -> `bool watch` + * `options.presence` -> `bool presence` -* UserListView options property is removed in favor of individual properties +* `UserListView` options property is removed in favor of individual properties - *options.presence -> bool presence + * `options.presence` -> `bool presence` -* Renamed ImageHeader to GalleryHeader +* Renamed `ImageHeader` to `GalleryHeader` -* Renamed ImageFooter to GalleryFooter +* Renamed `ImageFooter` to `GalleryFooter` -* MessageBuilder and ParentMessageBuilder signature is now +* `MessageBuilder` and `ParentMessageBuilder` signature is now ``` typedef MessageBuilder = Widget Function( @@ -66,28 +66,28 @@ typedef MessageBuilder = Widget Function( ); ``` -The last parameter is the default MessageWidget -You can call .copyWith to customize just a subset of properties +The last parameter is the default `MessageWidget` +You can call `.copyWith` to customize just a subset of properties #### ✅ Added Added video compress options (frame and quality) to MessageInput -TypingIndicator now has a property called parentId to show typing indicator specific to threads -#493: add support for messageListView header/footer -MessageWidget accepts a userAvatarBuilder -Added pinMessage ui support -Added MessageListView.threadSeparatorBuilder property -Added MessageInput.onError property to allow error handling -Added GalleryHeader/GalleryFooter theme classes +`TypingIndicator` now has a property called `parentId` to show typing indicator specific to threads +#493: add support for `MessageListView` header/footer +`MessageWidget` accepts a `userAvatarBuilder` +Added `pinMessage` ui support +Added `MessageListView.threadSeparatorBuilder` property +Added `MessageInput.onError` property to allow error handling +Added `GalleryHeader`/`GalleryFooter` theme classes #### 🐞 Fixed #483: Keyboard covers input text box when editing message -Modals are shown using the nearest Navigator to make using the SDK easier in a nested navigator use case +`Modals` are shown using the nearest `Navigator` to make using the SDK easier in a nested navigator use case #484: messages don't update without a reload -MessageListView not rendering if the user is not a member of the channel -Fix MessageInput overflow when there are no actions +`MessageListView` not rendering if the user is not a member of the channel +Fix `MessageInput` overflow when there are no actions Minor fixes and improvements ### Migrating to 2.0 for `stream_chat_flutter` @@ -110,24 +110,24 @@ remedy the issue: 1) Replace the offending class names with the revised class names - * ChannelImage -> ChannelAvatar - * ImageHeader -> GalleryHeader - * ImageFooter -> GalleryFooter + * `ChannelImage` -> `ChannelAvatar` + * `ImageHeader` -> `GalleryHeader` + * `ImageFooter` -> `GalleryFooter` 2) The new version comes with revised color names since the previous names do not suit light/dark mode nomenclature. Make sure any old colors used from theme are changed over to the new theme color names: - * ColorTheme.black -> ColorTheme.textHighEmphasis - * ColorTheme.grey -> ColorTheme.textLowEmphasis - * ColorTheme.greyGainsboro -> ColorTheme.disabled - * ColorTheme.greyWhisper -> ColorTheme.borders - * ColorTheme.whiteSmoke -> ColorTheme.inputBg - * ColorTheme.whiteSnow -> ColorTheme.appBg - * ColorTheme.white -> ColorTheme.barsBg - * ColorTheme.blueAlice -> ColorTheme.linkBg - * ColorTheme.accentBlue -> ColorTheme.accentPrimary - * ColorTheme.accentRed -> ColorTheme.accentError - * ColorTheme.accentGreen -> ColorTheme.accentInfo + * `ColorTheme.black` -> `ColorTheme.textHighEmphasis` + * `ColorTheme.grey` -> `ColorTheme.textLowEmphasis` + * `ColorTheme.greyGainsboro` -> `ColorTheme.disabled` + * `ColorTheme.greyWhisper` -> `ColorTheme.borders` + * `ColorTheme.whiteSmoke` -> `ColorTheme.inputBg` + * `ColorTheme.whiteSnow` -> `ColorTheme.appBg` + * `ColorTheme.white` -> `ColorTheme.barsBg` + * `ColorTheme.blueAlice` -> `ColorTheme.linkBg` + * `ColorTheme.accentBlue` -> `ColorTheme.accentPrimary` + * `ColorTheme.accentRed` -> `ColorTheme.accentError` + * `ColorTheme.accentGreen` -> `ColorTheme.accentInfo` 3) We decided to make messages easier to customize and now supply the default implementation of the messages in the builder - so you can now customize a single parameter without having to redo the @@ -151,15 +151,15 @@ default implementation. * Migrate this package to null safety * channelsBloc.queryChannels(), ChannelListCore options param/property is removed in favor of individual params/properties - * options.state -> bool state - * options.watch -> bool watch - * options.presence -> bool presence -* usersBloc.queryUsers(), UserListCore options param/property is removed in favor of individual params/properties - * options.presence -> bool presence + * `options.state` -> `bool state` + * `options.watch` -> `bool watch` + * `options.presence` -> `bool presence` +* `usersBloc.queryUsers()`, `UserListCore` options param/property is removed in favor of individual params/properties + * `options.presence` -> `bool presence` #### ✅ Added -* Monitor connection using connectivity_plus package +* Monitor connection using `connectivity_plus` package #### 🐞 Fixed @@ -191,9 +191,9 @@ to a more type safe and sound approach by changing over to explicit parameters. 1) Change over Core widget implementations by using the explicit parameters instead of the options map. Use these explicit parameters in the widget constructor instead of the option keys: - * options.state -> bool state - * options.watch -> bool watch - * options.presence -> bool presence + * `options.state` -> `bool state` + * `options.watch` -> `bool watch` + * `options.presence` -> `bool presence` 2) Change over query calls in the BLoCs in the same way (change from options map to explicit parameters in the constructor) @@ -203,21 +203,21 @@ in the constructor) #### 🛑️ Breaking Changes from 1.5.3 * Migrate this package to null safety -* ConnectUserWithProvider now requires tokenProvider as a required param. (Removed from the constructor) -* client.disconnect() is now divided into two different functions - * client.closeConnection() -> for closing user websocket connection. - * client.disconnectUser() -> for disconnecting user and resetting client state. -* client.devToken() now returns a Token model instead of String. -* ApiError is removed in favor of StreamChatError - * StreamChatError -> parent type for all the stream errors. - * StreamWebSocketError -> for user websocket related errors. - * StreamChatNetworkError -> for network related errors. -* client.queryChannels(), channel.query() options param is removed in favor of individual params - * option.state -> bool state - * option.watch -> bool watch - * option.presence -> bool presence -* client.queryUsers() options param is removed in favor of individual params - * option.presence -> bool presence +* `ConnectUserWithProvider` now requires `tokenProvider` as a required param. (Removed from the constructor) +* `client.disconnect()` is now divided into two different functions + * `client.closeConnection()` -> for closing user websocket connection. + * `client.disconnectUser()` -> for disconnecting user and resetting client state. +* `client.devToken()` now returns a Token model instead of String. +* `ApiError` is removed in favor of `StreamChatError` + * `StreamChatError` -> parent type for all the stream errors. + * `StreamWebSocketError` -> for user websocket related errors. + * `StreamChatNetworkError` -> for network related errors. +* `client.queryChannels()`, `channel.query()` options param is removed in favor of individual params + * `option.state` -> `bool state` + * `option.watch` -> `bool watch` + * `option.presence` -> `bool presence` +* `client.queryUsers()` options param is removed in favor of individual params + * `option.presence` -> `bool presence` * Added typed filters #### 🐞 Fixed @@ -229,13 +229,13 @@ in the constructor) #### ✅ Added * New Location enum is introduced for easily changing the client location/baseUrl. -* New client.openConnection() and client.closeConnection() is introduced to connect/disconnect user ws connection. -* New client.partialUpdateMessage and channel.partialUpdateMessage methods -* connectWebSocket parameter in connect user calls to use the client in "connection-less" mode. +* New `client.openConnection()` and `client.closeConnection()` is introduced to connect/disconnect user ws connection. +* New `client.partialUpdateMessage` and `channel.partialUpdateMessage` methods +* `connectWebSocket` parameter in connect user calls to use the client in "connection-less" mode. #### 🔄 Changed -* baseURL is now deprecated in favor of using Location to change data location. +* `baseURL` is now deprecated in favor of using Location to change data location. ### Migrating to 2.0 for `stream_chat` @@ -259,25 +259,25 @@ remedy the issue: 2) We added more nuance to the `disconnectUser()` by adding two new methods - one to close the connection and the other to disconnect the user. This allows more fine-grained control for diconnection. - * client.closeConnection() -> for closing user websocket connection. - * client.disconnectUser() -> for disconnecting user and resetting client state. + * `client.closeConnection()` -> for closing user websocket connection. + * `client.disconnectUser()` -> for disconnecting user and resetting client state. 3) We refactored how we handle errors - new error types are now introduced instead of ApiError. - * StreamChatError -> parent type for all the stream errors. - * StreamWebSocketError -> for user websocket related errors. - * StreamChatNetworkError -> for network related errors. + * `StreamChatError` -> parent type for all the stream errors. + * `StreamWebSocketError` -> for user websocket related errors. + * `StreamChatNetworkError` -> for network related errors. 4) We changed over from a map full of options to a more type safe and sound approach by changing over to explicit parameters. Use these explicit parameters in the query parameters instead of the option keys: -* client.queryChannels(), channel.query() options param is removed in favor of individual params - * option.state -> bool state - * option.watch -> bool watch - * option.presence -> bool presence -* client.queryUsers() options param is removed in favor of individual params - * option.presence -> bool presence +* `client.queryChannels()`, `channel.query()` options param is removed in favor of individual params + * `option.state` -> `bool state` + * `option.watch` -> `bool watch` + * `option.presence` -> `bool presence` +* `client.queryUsers()` options param is removed in favor of individual params + * `option.presence` -> `bool presence` 5) We added type safe filters to make filtering in the app easier. Change over the filters to the new implementation. From 18be18678b8cfa4946730b79aa462afbf13b3c19 Mon Sep 17 00:00:00 2001 From: Deven Joshi Date: Fri, 16 Jul 2021 20:35:21 +0530 Subject: [PATCH 09/24] fix: details --- docusaurus/docs/Flutter/guides/migration_guide_2_0.mdx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docusaurus/docs/Flutter/guides/migration_guide_2_0.mdx b/docusaurus/docs/Flutter/guides/migration_guide_2_0.mdx index 4b8662ac..38422e72 100644 --- a/docusaurus/docs/Flutter/guides/migration_guide_2_0.mdx +++ b/docusaurus/docs/Flutter/guides/migration_guide_2_0.mdx @@ -82,8 +82,7 @@ Added `GalleryHeader`/`GalleryFooter` theme classes #### 🐞 Fixed -#483: Keyboard covers input text box when editing -message +#483: Keyboard covers input text box when editing message `Modals` are shown using the nearest `Navigator` to make using the SDK easier in a nested navigator use case #484: messages don't update without a reload `MessageListView` not rendering if the user is not a member of the channel From 6afe6a83f52c6700d352b8bd892d01c89ade7df8 Mon Sep 17 00:00:00 2001 From: Deven Joshi Date: Fri, 16 Jul 2021 20:39:06 +0530 Subject: [PATCH 10/24] Update docusaurus/docs/Flutter/guides/migration_guide_2_0.mdx Co-authored-by: Gordon --- docusaurus/docs/Flutter/guides/migration_guide_2_0.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docusaurus/docs/Flutter/guides/migration_guide_2_0.mdx b/docusaurus/docs/Flutter/guides/migration_guide_2_0.mdx index 38422e72..3e3bafd7 100644 --- a/docusaurus/docs/Flutter/guides/migration_guide_2_0.mdx +++ b/docusaurus/docs/Flutter/guides/migration_guide_2_0.mdx @@ -15,7 +15,7 @@ Check [this link](https://flutter.dev/docs/null-safety) for more about Null Safe This guide is intended to enumerate and better explain the changes in the SDK. -The changes will be listed by package and a concise changelog will be followed by more info. +The changes will be listed by package and a concise changelog will follow with more info. ### Changelog of `stream_chat_flutter` @@ -295,4 +295,4 @@ Would turn into: ```dart filter: Filter.in_('members', [StreamChat.of(context).user.id]) -``` \ No newline at end of file +``` From 9b6c2df1d7c68656c53e67b344e651d2fdc789f6 Mon Sep 17 00:00:00 2001 From: Deven Joshi Date: Fri, 16 Jul 2021 20:39:30 +0530 Subject: [PATCH 11/24] Update docusaurus/docs/Flutter/guides/migration_guide_2_0.mdx Co-authored-by: Reuben Turner --- docusaurus/docs/Flutter/guides/migration_guide_2_0.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docusaurus/docs/Flutter/guides/migration_guide_2_0.mdx b/docusaurus/docs/Flutter/guides/migration_guide_2_0.mdx index 3e3bafd7..e9c5ef15 100644 --- a/docusaurus/docs/Flutter/guides/migration_guide_2_0.mdx +++ b/docusaurus/docs/Flutter/guides/migration_guide_2_0.mdx @@ -105,7 +105,7 @@ dependencies: ``` Upon doing this, all breaking changes from the package will take immediate effect. Here are steps to -remedy the issue: +remedy the issues: 1) Replace the offending class names with the revised class names From 6ff32fb26c02038c3a598f3275c4f23be9e052cf Mon Sep 17 00:00:00 2001 From: Deven Joshi Date: Fri, 16 Jul 2021 20:40:25 +0530 Subject: [PATCH 12/24] Update docusaurus/docs/Flutter/guides/migration_guide_2_0.mdx Co-authored-by: Reuben Turner --- docusaurus/docs/Flutter/guides/migration_guide_2_0.mdx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docusaurus/docs/Flutter/guides/migration_guide_2_0.mdx b/docusaurus/docs/Flutter/guides/migration_guide_2_0.mdx index e9c5ef15..8800df44 100644 --- a/docusaurus/docs/Flutter/guides/migration_guide_2_0.mdx +++ b/docusaurus/docs/Flutter/guides/migration_guide_2_0.mdx @@ -141,8 +141,7 @@ typedef MessageBuilder = Widget Function( ); ``` -Use `defaultMessageWidget.copyWith()` to edit any properties to make it much simpler to tweak the -default implementation. +To tweak any of the default properties individually, you can use `defaultMessageWidget.copyWith()`. ### Changelog of `stream_chat_flutter_core` From 8edf68b3b96fd65072553e2e96f4312650870cd4 Mon Sep 17 00:00:00 2001 From: Deven Joshi Date: Fri, 16 Jul 2021 20:40:40 +0530 Subject: [PATCH 13/24] Update docusaurus/docs/Flutter/guides/migration_guide_2_0.mdx Co-authored-by: Reuben Turner --- docusaurus/docs/Flutter/guides/migration_guide_2_0.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docusaurus/docs/Flutter/guides/migration_guide_2_0.mdx b/docusaurus/docs/Flutter/guides/migration_guide_2_0.mdx index 8800df44..f821217c 100644 --- a/docusaurus/docs/Flutter/guides/migration_guide_2_0.mdx +++ b/docusaurus/docs/Flutter/guides/migration_guide_2_0.mdx @@ -250,7 +250,7 @@ dependencies: ``` Upon doing this, all breaking changes from the package will take immediate effect. Here are steps to -remedy the issue: +remedy the issues: 1) Change over the constructor of `connectUserWithProvider()` to the new format. From d62e9a81b09ce8647960bbb9d8a97277e7aeb5a2 Mon Sep 17 00:00:00 2001 From: Deven Joshi Date: Fri, 16 Jul 2021 20:41:20 +0530 Subject: [PATCH 14/24] Update docusaurus/docs/Flutter/guides/migration_guide_2_0.mdx Co-authored-by: Reuben Turner --- docusaurus/docs/Flutter/guides/migration_guide_2_0.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docusaurus/docs/Flutter/guides/migration_guide_2_0.mdx b/docusaurus/docs/Flutter/guides/migration_guide_2_0.mdx index f821217c..bf044e5b 100644 --- a/docusaurus/docs/Flutter/guides/migration_guide_2_0.mdx +++ b/docusaurus/docs/Flutter/guides/migration_guide_2_0.mdx @@ -254,7 +254,7 @@ remedy the issues: 1) Change over the constructor of `connectUserWithProvider()` to the new format. -2) We added more nuance to the `disconnectUser()` by adding two new methods - one to close the connection +2) We added more nuance to `disconnectUser()` by adding two new methods - one to close the connection and the other to disconnect the user. This allows more fine-grained control for diconnection. * `client.closeConnection()` -> for closing user websocket connection. From ac27b9bc2b41b8353bba38f3de768c3f3de582ea Mon Sep 17 00:00:00 2001 From: Deven Joshi Date: Fri, 16 Jul 2021 20:41:33 +0530 Subject: [PATCH 15/24] Update docusaurus/docs/Flutter/guides/migration_guide_2_0.mdx Co-authored-by: Reuben Turner --- docusaurus/docs/Flutter/guides/migration_guide_2_0.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docusaurus/docs/Flutter/guides/migration_guide_2_0.mdx b/docusaurus/docs/Flutter/guides/migration_guide_2_0.mdx index bf044e5b..ef290520 100644 --- a/docusaurus/docs/Flutter/guides/migration_guide_2_0.mdx +++ b/docusaurus/docs/Flutter/guides/migration_guide_2_0.mdx @@ -255,7 +255,7 @@ remedy the issues: 1) Change over the constructor of `connectUserWithProvider()` to the new format. 2) We added more nuance to `disconnectUser()` by adding two new methods - one to close the connection -and the other to disconnect the user. This allows more fine-grained control for diconnection. +and the other to disconnect the user. This allows more fine-grained control of disconnection. * `client.closeConnection()` -> for closing user websocket connection. * `client.disconnectUser()` -> for disconnecting user and resetting client state. From 00b1f21c635971fb9bc5d3ae54591b1e77e4b599 Mon Sep 17 00:00:00 2001 From: Deven Joshi Date: Fri, 16 Jul 2021 20:41:49 +0530 Subject: [PATCH 16/24] Update docusaurus/docs/Flutter/guides/migration_guide_2_0.mdx Co-authored-by: Reuben Turner --- docusaurus/docs/Flutter/guides/migration_guide_2_0.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docusaurus/docs/Flutter/guides/migration_guide_2_0.mdx b/docusaurus/docs/Flutter/guides/migration_guide_2_0.mdx index ef290520..9a4b7a7d 100644 --- a/docusaurus/docs/Flutter/guides/migration_guide_2_0.mdx +++ b/docusaurus/docs/Flutter/guides/migration_guide_2_0.mdx @@ -260,7 +260,7 @@ and the other to disconnect the user. This allows more fine-grained control of d * `client.closeConnection()` -> for closing user websocket connection. * `client.disconnectUser()` -> for disconnecting user and resetting client state. -3) We refactored how we handle errors - new error types are now introduced instead of ApiError. +3) We refactored how we handle errors - new error types are now introduced that replace ApiError. * `StreamChatError` -> parent type for all the stream errors. * `StreamWebSocketError` -> for user websocket related errors. From 816f9ab7fa7ed9d19542c4dd819f1de6ff36749e Mon Sep 17 00:00:00 2001 From: Deven Joshi Date: Fri, 16 Jul 2021 20:41:59 +0530 Subject: [PATCH 17/24] Update docusaurus/docs/Flutter/guides/migration_guide_2_0.mdx Co-authored-by: Reuben Turner --- docusaurus/docs/Flutter/guides/migration_guide_2_0.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docusaurus/docs/Flutter/guides/migration_guide_2_0.mdx b/docusaurus/docs/Flutter/guides/migration_guide_2_0.mdx index 9a4b7a7d..094abab1 100644 --- a/docusaurus/docs/Flutter/guides/migration_guide_2_0.mdx +++ b/docusaurus/docs/Flutter/guides/migration_guide_2_0.mdx @@ -266,7 +266,7 @@ and the other to disconnect the user. This allows more fine-grained control of d * `StreamWebSocketError` -> for user websocket related errors. * `StreamChatNetworkError` -> for network related errors. -4) We changed over from a map full of options to a more type safe and sound approach by changing over to explicit parameters. +4) We changed over from a map full of options to a more type-safe and sound approach by changing over to explicit parameters. Use these explicit parameters in the query parameters instead of the option keys: From 695760637b705f79493795431818c4ffd3c43df2 Mon Sep 17 00:00:00 2001 From: Deven Joshi Date: Fri, 16 Jul 2021 20:42:07 +0530 Subject: [PATCH 18/24] Update docusaurus/docs/Flutter/guides/migration_guide_2_0.mdx Co-authored-by: Reuben Turner --- docusaurus/docs/Flutter/guides/migration_guide_2_0.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docusaurus/docs/Flutter/guides/migration_guide_2_0.mdx b/docusaurus/docs/Flutter/guides/migration_guide_2_0.mdx index 094abab1..582617ff 100644 --- a/docusaurus/docs/Flutter/guides/migration_guide_2_0.mdx +++ b/docusaurus/docs/Flutter/guides/migration_guide_2_0.mdx @@ -277,7 +277,7 @@ Use these explicit parameters in the query parameters instead of the option keys * `client.queryUsers()` options param is removed in favor of individual params * `option.presence` -> `bool presence` -5) We added type safe filters to make filtering in the app easier. Change over the filters to the +5) We added type-safe filters to make filtering in the app easier. Change over the filters to the new implementation. As an example, in the old app this filter: From 3c394362cce79f0afc2ff9d42cafdebf9f25b8c7 Mon Sep 17 00:00:00 2001 From: Deven Joshi Date: Fri, 16 Jul 2021 20:43:46 +0530 Subject: [PATCH 19/24] Update docusaurus/docs/Flutter/guides/migration_guide_2_0.mdx Co-authored-by: Reuben Turner --- docusaurus/docs/Flutter/guides/migration_guide_2_0.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docusaurus/docs/Flutter/guides/migration_guide_2_0.mdx b/docusaurus/docs/Flutter/guides/migration_guide_2_0.mdx index 582617ff..b9ed7609 100644 --- a/docusaurus/docs/Flutter/guides/migration_guide_2_0.mdx +++ b/docusaurus/docs/Flutter/guides/migration_guide_2_0.mdx @@ -252,7 +252,7 @@ dependencies: Upon doing this, all breaking changes from the package will take immediate effect. Here are steps to remedy the issues: -1) Change over the constructor of `connectUserWithProvider()` to the new format. +1) Change over the constructor of `connectUserWithProvider()` to the new format which has `tokenProvider` as a required param. 2) We added more nuance to `disconnectUser()` by adding two new methods - one to close the connection and the other to disconnect the user. This allows more fine-grained control of disconnection. From 60cddfc09174c8a8bac5907322a8be501a3c94be Mon Sep 17 00:00:00 2001 From: Deven Joshi Date: Fri, 16 Jul 2021 20:43:55 +0530 Subject: [PATCH 20/24] Update docusaurus/docs/Flutter/guides/migration_guide_2_0.mdx Co-authored-by: Gordon --- docusaurus/docs/Flutter/guides/migration_guide_2_0.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docusaurus/docs/Flutter/guides/migration_guide_2_0.mdx b/docusaurus/docs/Flutter/guides/migration_guide_2_0.mdx index b9ed7609..4d3afe33 100644 --- a/docusaurus/docs/Flutter/guides/migration_guide_2_0.mdx +++ b/docusaurus/docs/Flutter/guides/migration_guide_2_0.mdx @@ -221,7 +221,7 @@ in the constructor) #### 🐞 Fixed * #369: Client does not return without internet connection -* several minor fixes +* Several minor fixes * performance improvements #### ✅ Added From c513bd06ffd2eff5a19f4d1e091a3df4c69bf67c Mon Sep 17 00:00:00 2001 From: Deven Joshi Date: Fri, 16 Jul 2021 20:44:00 +0530 Subject: [PATCH 21/24] Update docusaurus/docs/Flutter/guides/migration_guide_2_0.mdx Co-authored-by: Gordon --- docusaurus/docs/Flutter/guides/migration_guide_2_0.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docusaurus/docs/Flutter/guides/migration_guide_2_0.mdx b/docusaurus/docs/Flutter/guides/migration_guide_2_0.mdx index 4d3afe33..2b53cfb3 100644 --- a/docusaurus/docs/Flutter/guides/migration_guide_2_0.mdx +++ b/docusaurus/docs/Flutter/guides/migration_guide_2_0.mdx @@ -222,7 +222,7 @@ in the constructor) * #369: Client does not return without internet connection * Several minor fixes -* performance improvements +* Performance improvements #### ✅ Added From cb5db2796cf240eebaaa98c99f36e4d1cb67ac07 Mon Sep 17 00:00:00 2001 From: Deven Joshi Date: Fri, 16 Jul 2021 20:44:40 +0530 Subject: [PATCH 22/24] Update docusaurus/docs/Flutter/guides/migration_guide_2_0.mdx Co-authored-by: Gordon --- docusaurus/docs/Flutter/guides/migration_guide_2_0.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docusaurus/docs/Flutter/guides/migration_guide_2_0.mdx b/docusaurus/docs/Flutter/guides/migration_guide_2_0.mdx index 2b53cfb3..a9b64a57 100644 --- a/docusaurus/docs/Flutter/guides/migration_guide_2_0.mdx +++ b/docusaurus/docs/Flutter/guides/migration_guide_2_0.mdx @@ -148,7 +148,7 @@ To tweak any of the default properties individually, you can use `defaultMessage #### 🛑️ Breaking Changes from 1.5.3 * Migrate this package to null safety -* channelsBloc.queryChannels(), ChannelListCore options param/property is removed in favor of individual params/properties +* `channelsBloc.queryChannels()`, `ChannelListCore` options param/property is removed in favor of individual params/properties * `options.state` -> `bool state` * `options.watch` -> `bool watch` * `options.presence` -> `bool presence` From 9a36b961ba53e6cf87a16764dfa352d6f2296340 Mon Sep 17 00:00:00 2001 From: Deven Joshi Date: Fri, 16 Jul 2021 20:45:22 +0530 Subject: [PATCH 23/24] Update docusaurus/docs/Flutter/guides/migration_guide_2_0.mdx --- docusaurus/docs/Flutter/guides/migration_guide_2_0.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docusaurus/docs/Flutter/guides/migration_guide_2_0.mdx b/docusaurus/docs/Flutter/guides/migration_guide_2_0.mdx index a9b64a57..58873822 100644 --- a/docusaurus/docs/Flutter/guides/migration_guide_2_0.mdx +++ b/docusaurus/docs/Flutter/guides/migration_guide_2_0.mdx @@ -27,7 +27,7 @@ The changes will be listed by package and a concise changelog will follow with m * Updated `StreamChatThemeData.reactionIcons` to accept custom builder -* Renamed ColorTheme properties to reflect the purpose of the colors +* Renamed `ColorTheme` properties to reflect the purpose of the colors * `ColorTheme.black` -> `ColorTheme.textHighEmphasis` * `ColorTheme.grey` -> `ColorTheme.textLowEmphasis` From 95febb00cfdc73e06d496c5fa4d49753bf620374 Mon Sep 17 00:00:00 2001 From: Deven Joshi Date: Fri, 16 Jul 2021 20:47:37 +0530 Subject: [PATCH 24/24] Update docusaurus/docs/Flutter/guides/migration_guide_2_0.mdx --- docusaurus/docs/Flutter/guides/migration_guide_2_0.mdx | 1 + 1 file changed, 1 insertion(+) diff --git a/docusaurus/docs/Flutter/guides/migration_guide_2_0.mdx b/docusaurus/docs/Flutter/guides/migration_guide_2_0.mdx index 58873822..394137bd 100644 --- a/docusaurus/docs/Flutter/guides/migration_guide_2_0.mdx +++ b/docusaurus/docs/Flutter/guides/migration_guide_2_0.mdx @@ -166,6 +166,7 @@ To tweak any of the default properties individually, you can use `defaultMessage ### Migrating to 2.0 for `stream_chat_flutter_core` +:::note If you are migrating your full Flutter project to null-safety, first make sure you follow the instructions from the [official Null Safety migration guide](https://dart.dev/null-safety/migration-guide). :::