From 914c9cc1371a4cc16c57b7e3961afbd547ea3998 Mon Sep 17 00:00:00 2001 From: Dawid <16155640+geweald@users.noreply.github.com> Date: Tue, 9 Nov 2021 13:21:50 +0100 Subject: [PATCH 1/8] Update extension.dart --- packages/stream_chat_flutter/lib/src/extension.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/stream_chat_flutter/lib/src/extension.dart b/packages/stream_chat_flutter/lib/src/extension.dart index 92590de1..6086b8b7 100644 --- a/packages/stream_chat_flutter/lib/src/extension.dart +++ b/packages/stream_chat_flutter/lib/src/extension.dart @@ -46,7 +46,7 @@ extension IterableX on Iterable { extension PlatformFileX on PlatformFile { /// Converts the [PlatformFile] into [AttachmentFile] AttachmentFile get toAttachmentFile => AttachmentFile( - path: path, + path: kIsWeb ? null : path, name: name, bytes: bytes, size: size, From d5d92cfcca8e588c6d412d37e8f57c1d5b04b7a4 Mon Sep 17 00:00:00 2001 From: Dawid <16155640+geweald@users.noreply.github.com> Date: Tue, 9 Nov 2021 13:43:07 +0100 Subject: [PATCH 2/8] Update extension.dart --- packages/stream_chat_flutter/lib/src/extension.dart | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/stream_chat_flutter/lib/src/extension.dart b/packages/stream_chat_flutter/lib/src/extension.dart index 6086b8b7..73956da6 100644 --- a/packages/stream_chat_flutter/lib/src/extension.dart +++ b/packages/stream_chat_flutter/lib/src/extension.dart @@ -1,6 +1,7 @@ import 'package:characters/characters.dart'; import 'package:diacritic/diacritic.dart'; import 'package:file_picker/file_picker.dart'; +import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:stream_chat_flutter/src/emoji/emoji.dart'; import 'package:stream_chat_flutter/src/localization/translations.dart'; From 7f8f4a91c78d7e9a51affa6dcc37c21b212bd0da Mon Sep 17 00:00:00 2001 From: geweald Date: Wed, 10 Nov 2021 18:22:16 +0100 Subject: [PATCH 3/8] fix web attachments and ws --- packages/stream_chat/lib/src/ws/websocket.dart | 3 ++- packages/stream_chat_flutter/lib/src/extension.dart | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/stream_chat/lib/src/ws/websocket.dart b/packages/stream_chat/lib/src/ws/websocket.dart index 05382fb7..a95eae70 100644 --- a/packages/stream_chat/lib/src/ws/websocket.dart +++ b/packages/stream_chat/lib/src/ws/websocket.dart @@ -121,7 +121,8 @@ class WebSocket with TimerHelper { _logger?.info('Closing connection with $baseUrl'); if (_webSocketChannel != null) { _unsubscribeFromWebSocketChannel(); - _webSocketChannel?.sink.close(status.goingAway); + _webSocketChannel?.sink + .close(_manuallyClosed ? status.normalClosure : status.goingAway); _webSocketChannel = null; } } diff --git a/packages/stream_chat_flutter/lib/src/extension.dart b/packages/stream_chat_flutter/lib/src/extension.dart index 6086b8b7..73956da6 100644 --- a/packages/stream_chat_flutter/lib/src/extension.dart +++ b/packages/stream_chat_flutter/lib/src/extension.dart @@ -1,6 +1,7 @@ import 'package:characters/characters.dart'; import 'package:diacritic/diacritic.dart'; import 'package:file_picker/file_picker.dart'; +import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:stream_chat_flutter/src/emoji/emoji.dart'; import 'package:stream_chat_flutter/src/localization/translations.dart'; From 235cac600096cbb9d12c5dd8969734ae14d1ec99 Mon Sep 17 00:00:00 2001 From: geweald Date: Mon, 15 Nov 2021 11:24:05 +0100 Subject: [PATCH 4/8] update changelogs --- packages/stream_chat/CHANGELOG.md | 54 ++++---- packages/stream_chat_flutter/CHANGELOG.md | 154 +++++++++++----------- 2 files changed, 110 insertions(+), 98 deletions(-) diff --git a/packages/stream_chat/CHANGELOG.md b/packages/stream_chat/CHANGELOG.md index 4b409536..8617ba42 100644 --- a/packages/stream_chat/CHANGELOG.md +++ b/packages/stream_chat/CHANGELOG.md @@ -1,3 +1,9 @@ +## Upcoming + +🐞 Fixed + +- `closeConnection()` now uses `normalClosure` status when closing websocket. + ## 3.2.0 🐞 Fixed @@ -21,12 +27,12 @@ 🛑️ Breaking Changes from `2.2.1` - Added 6 new methods in `ChatPersistenceClient`. - - `bulkUpdateMessages` - - `bulkUpdatePinnedMessages` - - `bulkUpdateMembers` - - `bulkUpdateReads` - - `updatePinnedMessageReactions` - - `deletePinnedMessageReactionsByMessageId` + - `bulkUpdateMessages` + - `bulkUpdatePinnedMessages` + - `bulkUpdateMembers` + - `bulkUpdateReads` + - `updatePinnedMessageReactions` + - `deletePinnedMessageReactionsByMessageId` ✅ Added @@ -104,19 +110,19 @@ - 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 + - `option.presence` -> bool presence - Migrate this package to null safety - Added typed filters @@ -150,19 +156,19 @@ - `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 + - `option.presence` -> bool presence ✅ Added diff --git a/packages/stream_chat_flutter/CHANGELOG.md b/packages/stream_chat_flutter/CHANGELOG.md index 00f8412b..fe52c849 100644 --- a/packages/stream_chat_flutter/CHANGELOG.md +++ b/packages/stream_chat_flutter/CHANGELOG.md @@ -1,3 +1,9 @@ +## Upcoming + +🐞 Fixed + +- Fixed adding attachments on web. + ## 3.2.0 - Updated Dart SDK constraints to `>=2.14.0 <3.0.0` @@ -70,36 +76,36 @@ ⚠️ Deprecated - `MessageSearchListView` `paginationParams` property is now deprecated in favor of `limit`. - ```dart - // previous - paginationParams = const PaginationParams(limit: 30) - - // new - limit = 30 - ``` + ```dart + // previous + paginationParams = const PaginationParams(limit: 30) + + // new + limit = 30 + ``` - `UserListView` `pagination` property is now deprecated in favor of `limit`. - ```dart - // previous - pagination = const PaginationParams(limit: 30) - - // new - limit = 30 - ``` + ```dart + // previous + pagination = const PaginationParams(limit: 30) + + // new + limit = 30 + ``` - `ChannelListView` `pagination` property is now deprecated in favor of `limit`. - ```dart - // previous - pagination = const PaginationParams(limit: 30) - - // new - limit = 30 - ``` + ```dart + // previous + pagination = const PaginationParams(limit: 30) + + // new + limit = 30 + ``` 🔄 Changed - `UserListViewCore` filter property now has a default value. - ```dart - filter = const Filter.empty() - ``` + ```dart + filter = const Filter.empty() + ``` 🐞 Fixed @@ -117,11 +123,11 @@ - [#516](https://github.com/GetStream/stream-chat-flutter/issues/516): Added `StreamChatThemeData.placeholderUserImage` for building a widget when the `UserAvatar` image is loading - Added a `backgroundColor` property to the following widgets: - - `ChannelHeader` - - `ChannelListHeader` - - `GalleryHeader` - - `GalleryFooter` - - `ThreadHeader` + - `ChannelHeader` + - `ChannelListHeader` + - `GalleryHeader` + - `GalleryFooter` + - `ThreadHeader` - Added `MessageInput.attachmentLimit` in order to limit the no. of attachments that can be sent with a single message. - Added `MessageInput.onAttachmentLimitExceed` callback which will be called when the `attachmentLimit` is exceeded. This will override the default error alert behaviour. @@ -135,7 +141,7 @@ typedef ActionButtonBuilder = Widget Function( ``` > **_NOTE:_** The last parameter is the default `ActionButton` -You can call `.copyWith` to customize just a subset of properties. +> You can call `.copyWith` to customize just a subset of properties. - Added slow mode which allows a cooldown period after a user sends a message. @@ -144,18 +150,18 @@ You can call `.copyWith` to customize just a subset of properties. Theming has been upgraded! Most theme classes now have `InheritedTheme` classes associated with them, and have been upgraded with some goodies like `lerp` functions. Here's the full naming breakdown: -* `AvatarTheme` is now `AvatarThemeData` -* `ChannelHeaderTheme` is now `ChannelHeaderThemeData` -* `ChannelListHeaderTheme` is now `ChannelListHeaderThemeData` -* `ChannelListViewTheme` is now `ChannelListViewThemeData` -* `ChannelPreviewTheme` is now `ChannelPreviewThemeData` -* `MessageInputTheme` is now `MessageInputThemeData` -* `MessageListViewTheme` is now `MessageListViewTheme` -* `MessageSearchListViewTheme` is now `MessageSearchListViewThemeData` -* `MessageTheme` is now `MessageThemeData` -* `UserListViewTheme` is now `UserListViewThemeData` +- `AvatarTheme` is now `AvatarThemeData` +- `ChannelHeaderTheme` is now `ChannelHeaderThemeData` +- `ChannelListHeaderTheme` is now `ChannelListHeaderThemeData` +- `ChannelListViewTheme` is now `ChannelListViewThemeData` +- `ChannelPreviewTheme` is now `ChannelPreviewThemeData` +- `MessageInputTheme` is now `MessageInputThemeData` +- `MessageListViewTheme` is now `MessageListViewTheme` +- `MessageSearchListViewTheme` is now `MessageSearchListViewThemeData` +- `MessageTheme` is now `MessageThemeData` +- `UserListViewTheme` is now `UserListViewThemeData` -- Updated core dependency. +* Updated core dependency. 🐞 Fixed @@ -202,24 +208,25 @@ upgraded with some goodies like `lerp` functions. Here's the full naming breakdo - 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` + + - `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 + - `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 + - `options.presence` -> bool presence - Renamed `ImageHeader` to `GalleryHeader` - Renamed `ImageFooter` to `GalleryFooter` - `MessageBuilder` and `ParentMessageBuilder` signature is now @@ -234,8 +241,7 @@ typedef MessageBuilder = Widget Function( ``` > **_NOTE:_** the last parameter is the default `MessageWidget` -You can call `.copyWith` to customize just a subset of properties - +> You can call `.copyWith` to customize just a subset of properties ✅ Added @@ -263,17 +269,17 @@ You can call `.copyWith` to customize just a subset of properties 🛑️ Breaking Changes from `2.0.0-nullsafety.8` - 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` ✅ Added @@ -284,11 +290,11 @@ You can call `.copyWith` to customize just a subset of properties 🛑️ Breaking Changes from `2.0.0-nullsafety.7` - `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 - - `options.presence` -> bool presence + - `options.presence` -> bool presence - `MessageBuilder` and `ParentMessageBuilder` signature is now ```dart @@ -301,7 +307,7 @@ typedef MessageBuilder = Widget Function( ``` > **_NOTE:_** The last parameter is the default `MessageWidget` -You can call `.copyWith` to customize just a subset of properties. +> You can call `.copyWith` to customize just a subset of properties. ✅ Added From 5e33088b8b45c9900ff76002a0d9ee5b8f7f11b7 Mon Sep 17 00:00:00 2001 From: geweald Date: Mon, 15 Nov 2021 11:29:47 +0100 Subject: [PATCH 5/8] fix - revert changelog formatting --- packages/stream_chat/CHANGELOG.md | 50 ++++---- packages/stream_chat_flutter/CHANGELOG.md | 150 +++++++++++----------- 2 files changed, 100 insertions(+), 100 deletions(-) diff --git a/packages/stream_chat/CHANGELOG.md b/packages/stream_chat/CHANGELOG.md index 8617ba42..46f60da0 100644 --- a/packages/stream_chat/CHANGELOG.md +++ b/packages/stream_chat/CHANGELOG.md @@ -27,12 +27,12 @@ 🛑️ Breaking Changes from `2.2.1` - Added 6 new methods in `ChatPersistenceClient`. - - `bulkUpdateMessages` - - `bulkUpdatePinnedMessages` - - `bulkUpdateMembers` - - `bulkUpdateReads` - - `updatePinnedMessageReactions` - - `deletePinnedMessageReactionsByMessageId` + - `bulkUpdateMessages` + - `bulkUpdatePinnedMessages` + - `bulkUpdateMembers` + - `bulkUpdateReads` + - `updatePinnedMessageReactions` + - `deletePinnedMessageReactionsByMessageId` ✅ Added @@ -110,19 +110,19 @@ - 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 + - `option.presence` -> bool presence - Migrate this package to null safety - Added typed filters @@ -156,19 +156,19 @@ - `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 + - `option.presence` -> bool presence ✅ Added @@ -726,4 +726,4 @@ ## 0.0.2 -- first beta version +- first beta version \ No newline at end of file diff --git a/packages/stream_chat_flutter/CHANGELOG.md b/packages/stream_chat_flutter/CHANGELOG.md index fe52c849..73d49806 100644 --- a/packages/stream_chat_flutter/CHANGELOG.md +++ b/packages/stream_chat_flutter/CHANGELOG.md @@ -76,36 +76,36 @@ ⚠️ Deprecated - `MessageSearchListView` `paginationParams` property is now deprecated in favor of `limit`. - ```dart - // previous - paginationParams = const PaginationParams(limit: 30) - - // new - limit = 30 - ``` + ```dart + // previous + paginationParams = const PaginationParams(limit: 30) + + // new + limit = 30 + ``` - `UserListView` `pagination` property is now deprecated in favor of `limit`. - ```dart - // previous - pagination = const PaginationParams(limit: 30) - - // new - limit = 30 - ``` + ```dart + // previous + pagination = const PaginationParams(limit: 30) + + // new + limit = 30 + ``` - `ChannelListView` `pagination` property is now deprecated in favor of `limit`. - ```dart - // previous - pagination = const PaginationParams(limit: 30) - - // new - limit = 30 - ``` + ```dart + // previous + pagination = const PaginationParams(limit: 30) + + // new + limit = 30 + ``` 🔄 Changed - `UserListViewCore` filter property now has a default value. - ```dart - filter = const Filter.empty() - ``` + ```dart + filter = const Filter.empty() + ``` 🐞 Fixed @@ -123,11 +123,11 @@ - [#516](https://github.com/GetStream/stream-chat-flutter/issues/516): Added `StreamChatThemeData.placeholderUserImage` for building a widget when the `UserAvatar` image is loading - Added a `backgroundColor` property to the following widgets: - - `ChannelHeader` - - `ChannelListHeader` - - `GalleryHeader` - - `GalleryFooter` - - `ThreadHeader` + - `ChannelHeader` + - `ChannelListHeader` + - `GalleryHeader` + - `GalleryFooter` + - `ThreadHeader` - Added `MessageInput.attachmentLimit` in order to limit the no. of attachments that can be sent with a single message. - Added `MessageInput.onAttachmentLimitExceed` callback which will be called when the `attachmentLimit` is exceeded. This will override the default error alert behaviour. @@ -141,7 +141,7 @@ typedef ActionButtonBuilder = Widget Function( ``` > **_NOTE:_** The last parameter is the default `ActionButton` -> You can call `.copyWith` to customize just a subset of properties. +You can call `.copyWith` to customize just a subset of properties. - Added slow mode which allows a cooldown period after a user sends a message. @@ -150,18 +150,18 @@ typedef ActionButtonBuilder = Widget Function( Theming has been upgraded! Most theme classes now have `InheritedTheme` classes associated with them, and have been upgraded with some goodies like `lerp` functions. Here's the full naming breakdown: -- `AvatarTheme` is now `AvatarThemeData` -- `ChannelHeaderTheme` is now `ChannelHeaderThemeData` -- `ChannelListHeaderTheme` is now `ChannelListHeaderThemeData` -- `ChannelListViewTheme` is now `ChannelListViewThemeData` -- `ChannelPreviewTheme` is now `ChannelPreviewThemeData` -- `MessageInputTheme` is now `MessageInputThemeData` -- `MessageListViewTheme` is now `MessageListViewTheme` -- `MessageSearchListViewTheme` is now `MessageSearchListViewThemeData` -- `MessageTheme` is now `MessageThemeData` -- `UserListViewTheme` is now `UserListViewThemeData` +* `AvatarTheme` is now `AvatarThemeData` +* `ChannelHeaderTheme` is now `ChannelHeaderThemeData` +* `ChannelListHeaderTheme` is now `ChannelListHeaderThemeData` +* `ChannelListViewTheme` is now `ChannelListViewThemeData` +* `ChannelPreviewTheme` is now `ChannelPreviewThemeData` +* `MessageInputTheme` is now `MessageInputThemeData` +* `MessageListViewTheme` is now `MessageListViewTheme` +* `MessageSearchListViewTheme` is now `MessageSearchListViewThemeData` +* `MessageTheme` is now `MessageThemeData` +* `UserListViewTheme` is now `UserListViewThemeData` -* Updated core dependency. +- Updated core dependency. 🐞 Fixed @@ -208,25 +208,24 @@ upgraded with some goodies like `lerp` functions. Here's the full naming breakdo - 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` + - `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 + - `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 + - `options.presence` -> bool presence - Renamed `ImageHeader` to `GalleryHeader` - Renamed `ImageFooter` to `GalleryFooter` - `MessageBuilder` and `ParentMessageBuilder` signature is now @@ -241,7 +240,8 @@ typedef MessageBuilder = Widget Function( ``` > **_NOTE:_** the last parameter is the default `MessageWidget` -> You can call `.copyWith` to customize just a subset of properties +You can call `.copyWith` to customize just a subset of properties + ✅ Added @@ -269,17 +269,17 @@ typedef MessageBuilder = Widget Function( 🛑️ Breaking Changes from `2.0.0-nullsafety.8` - 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` ✅ Added @@ -290,11 +290,11 @@ typedef MessageBuilder = Widget Function( 🛑️ Breaking Changes from `2.0.0-nullsafety.7` - `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 - - `options.presence` -> bool presence + - `options.presence` -> bool presence - `MessageBuilder` and `ParentMessageBuilder` signature is now ```dart @@ -307,7 +307,7 @@ typedef MessageBuilder = Widget Function( ``` > **_NOTE:_** The last parameter is the default `MessageWidget` -> You can call `.copyWith` to customize just a subset of properties. +You can call `.copyWith` to customize just a subset of properties. ✅ Added @@ -866,4 +866,4 @@ The property showVideoFullScreen was added mainly because of this issue brianega ## 0.0.1 -- First release +- First release \ No newline at end of file From 643f809eba76db0af73dea029671de147f4e2699 Mon Sep 17 00:00:00 2001 From: Deven Joshi Date: Tue, 16 Nov 2021 17:18:54 +0530 Subject: [PATCH 6/8] fixed membercount null error --- packages/stream_chat_flutter/CHANGELOG.md | 6 ++++++ packages/stream_chat_flutter/lib/src/message_widget.dart | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/stream_chat_flutter/CHANGELOG.md b/packages/stream_chat_flutter/CHANGELOG.md index 00f8412b..413537fb 100644 --- a/packages/stream_chat_flutter/CHANGELOG.md +++ b/packages/stream_chat_flutter/CHANGELOG.md @@ -1,3 +1,9 @@ +## Upcoming + +🐞 Fixed + +- Fixed `MessageWidget` null errors associated with `channel.memberCount`. + ## 3.2.0 - Updated Dart SDK constraints to `>=2.14.0 <3.0.0` diff --git a/packages/stream_chat_flutter/lib/src/message_widget.dart b/packages/stream_chat_flutter/lib/src/message_widget.dart index f6ae52c6..cd2488c3 100644 --- a/packages/stream_chat_flutter/lib/src/message_widget.dart +++ b/packages/stream_chat_flutter/lib/src/message_widget.dart @@ -1230,6 +1230,7 @@ class _MessageWidgetState extends State Widget _buildSendingIndicator() { final style = widget.messageTheme.createdAtStyle; final message = widget.message; + final memberCount = StreamChannel.of(context).channel.memberCount ?? 0; if (hasNonUrlAttachments && (message.status == MessageSendingStatus.sending || @@ -1260,7 +1261,7 @@ class _MessageWidgetState extends State if (isMessageRead) { child = Row( children: [ - if (StreamChannel.of(context).channel.memberCount! > 2) + if (memberCount > 2) Text( widget.readList!.length.toString(), style: style.copyWith( From bd637caebfd980b6b789a1224e0ffaa79ef1ca60 Mon Sep 17 00:00:00 2001 From: Salvatore Giordano Date: Tue, 16 Nov 2021 13:06:28 +0100 Subject: [PATCH 7/8] chore(repo): update melos in ci --- .github/workflows/dart_code_metrics.yaml | 2 +- .github/workflows/stream_flutter_workflow.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dart_code_metrics.yaml b/.github/workflows/dart_code_metrics.yaml index 0ae85b88..667ac2dd 100644 --- a/.github/workflows/dart_code_metrics.yaml +++ b/.github/workflows/dart_code_metrics.yaml @@ -33,7 +33,7 @@ jobs: flutter-version: ${{ env.flutter_version }} - name: "Install Tools" - run: flutter pub global activate melos 1.0.0-dev.6 + run: flutter pub global activate melos 1.0.0-dev.10 - name: "Bootstrap Workspace" run: melos bootstrap diff --git a/.github/workflows/stream_flutter_workflow.yml b/.github/workflows/stream_flutter_workflow.yml index 65913a18..b91dcb85 100644 --- a/.github/workflows/stream_flutter_workflow.yml +++ b/.github/workflows/stream_flutter_workflow.yml @@ -31,7 +31,7 @@ jobs: flutter-version: ${{ env.flutter_version }} - name: "Install Tools" run: | - flutter pub global activate melos 1.0.0-dev.6 + flutter pub global activate melos 1.0.0-dev.10 - name: "Bootstrap Workspace" run: melos bootstrap - name: "Dart Analyze" From 2f5b3a444cf5aa60e76f126f923336116d1ac955 Mon Sep 17 00:00:00 2001 From: Salvatore Giordano Date: Tue, 16 Nov 2021 17:16:33 +0100 Subject: [PATCH 8/8] chore(ui): remove dependecy --- packages/stream_chat_flutter/lib/src/gallery_footer.dart | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/stream_chat_flutter/lib/src/gallery_footer.dart b/packages/stream_chat_flutter/lib/src/gallery_footer.dart index dcfa0e29..0acd9b02 100644 --- a/packages/stream_chat_flutter/lib/src/gallery_footer.dart +++ b/packages/stream_chat_flutter/lib/src/gallery_footer.dart @@ -1,7 +1,6 @@ import 'dart:io'; import 'package:cached_network_image/cached_network_image.dart'; -import 'package:dio/dio.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:path_provider/path_provider.dart';