From d387ae260ff398bbd26bc768d270607ee7a89e61 Mon Sep 17 00:00:00 2001 From: Salvatore Giordano Date: Wed, 23 Mar 2022 11:02:46 +0100 Subject: [PATCH 1/6] update pubspec and changelogs --- packages/stream_chat/CHANGELOG.md | 10 ++++++++++ packages/stream_chat/lib/version.dart | 2 +- packages/stream_chat/pubspec.yaml | 2 +- packages/stream_chat_flutter/CHANGELOG.md | 19 +++++++++++++++++++ .../stream_chat_flutter/example/lib/main.dart | 3 ++- .../example/lib/tutorial_part_1.dart | 3 ++- .../example/lib/tutorial_part_2.dart | 3 ++- .../example/lib/tutorial_part_3.dart | 7 ++++--- .../example/lib/tutorial_part_4.dart | 6 ++++-- .../lib/src/attachment_actions_modal.dart | 3 ++- .../lib/src/localization/translations.dart | 5 +++-- .../lib/src/message_widget.dart | 3 ++- .../src/theme/channel_list_header_theme.dart | 6 ++++-- .../src/theme/channel_list_view_theme.dart | 6 ++++-- .../lib/src/theme/channel_preview_theme.dart | 3 ++- .../lib/src/theme/message_input_theme.dart | 6 ++++-- .../src/theme/message_list_view_theme.dart | 6 ++++-- .../theme/message_search_list_view_theme.dart | 4 ++-- .../stream_channel_list_tile.dart | 9 --------- .../message_input/countdown_button.dart | 0 .../message_input/simple_safe_area.dart | 0 .../stream_attachment_picker.dart | 2 +- .../message_input/stream_message_input.dart} | 7 ++++--- .../stream_message_send_button.dart | 0 .../stream_message_text_field.dart | 0 .../lib/src/{ => v4}/message_input/tld.dart | 0 .../lib/stream_chat_flutter.dart | 11 +++++------ packages/stream_chat_flutter/pubspec.yaml | 2 +- .../stream_chat_flutter_core/CHANGELOG.md | 15 +++++++++++---- .../stream_chat_flutter_core/pubspec.yaml | 4 ++-- .../stream_chat_localizations/CHANGELOG.md | 4 ++++ .../stream_chat_localizations/pubspec.yaml | 4 ++-- packages/stream_chat_persistence/CHANGELOG.md | 4 ++++ packages/stream_chat_persistence/pubspec.yaml | 4 ++-- 34 files changed, 108 insertions(+), 55 deletions(-) rename packages/stream_chat_flutter/lib/src/{ => v4}/message_input/countdown_button.dart (100%) rename packages/stream_chat_flutter/lib/src/{ => v4}/message_input/simple_safe_area.dart (100%) rename packages/stream_chat_flutter/lib/src/{ => v4}/message_input/stream_attachment_picker.dart (99%) rename packages/stream_chat_flutter/lib/src/{message_input/message_input.dart => v4/message_input/stream_message_input.dart} (99%) rename packages/stream_chat_flutter/lib/src/{ => v4}/message_input/stream_message_send_button.dart (100%) rename packages/stream_chat_flutter/lib/src/{ => v4}/message_input/stream_message_text_field.dart (100%) rename packages/stream_chat_flutter/lib/src/{ => v4}/message_input/tld.dart (100%) diff --git a/packages/stream_chat/CHANGELOG.md b/packages/stream_chat/CHANGELOG.md index a74b920e4..9b048e2a7 100644 --- a/packages/stream_chat/CHANGELOG.md +++ b/packages/stream_chat/CHANGELOG.md @@ -1,3 +1,13 @@ +## 4.0.0-beta.0 + +βœ… Added + +- Added support for ownCapabilities. + +🐞 Fixed + +- Minor fixes and improvements. + ## 3.5.1 🐞 Fixed diff --git a/packages/stream_chat/lib/version.dart b/packages/stream_chat/lib/version.dart index 8d0584a04..533df1ce6 100644 --- a/packages/stream_chat/lib/version.dart +++ b/packages/stream_chat/lib/version.dart @@ -3,4 +3,4 @@ import 'package:stream_chat/src/client/client.dart'; /// Current package version /// Used in [StreamChatClient] to build the `x-stream-client` header // ignore: constant_identifier_names -const PACKAGE_VERSION = '3.5.1'; +const PACKAGE_VERSION = '4.0.0-beta.0'; diff --git a/packages/stream_chat/pubspec.yaml b/packages/stream_chat/pubspec.yaml index 2e195f6b6..bf2c84e6c 100644 --- a/packages/stream_chat/pubspec.yaml +++ b/packages/stream_chat/pubspec.yaml @@ -1,7 +1,7 @@ name: stream_chat homepage: https://getstream.io/ description: The official Dart client for Stream Chat, a service for building chat applications. -version: 3.5.1 +version: 4.0.0-beta.0 repository: https://github.com/GetStream/stream-chat-flutter issue_tracker: https://github.com/GetStream/stream-chat-flutter/issues diff --git a/packages/stream_chat_flutter/CHANGELOG.md b/packages/stream_chat_flutter/CHANGELOG.md index fe8d6cd17..d116d50d3 100644 --- a/packages/stream_chat_flutter/CHANGELOG.md +++ b/packages/stream_chat_flutter/CHANGELOG.md @@ -1,3 +1,22 @@ +## 4.0.0-beta.0 + +βœ… Added + +- Deprecated old widgets in favor of Stream-prefixed ones. +- Use channel capabilities to show/hide actions. +- Deprecated `ChannelListView` in favor of `StreamChannelListView`. +- Deprecated `ChannelPreview` in favor of `StreamChannelListTile`. +- Deprecated `ChannelAvatar` in favor of `StreamChannelAvatar`. +- Deprecated `ChannelName` in favor of `StreamChannelName`. +- Deprecated `MessageInput` in favor of `StreamMessageInput`. +- Separated `MessageInput` widget in smaller components. (For example `CountDownButton`, `StreamAttachmentPicker`...) +- Updated `stream_chat_flutter_core` dependency to [`4.0.0-beta.0`](https://pub.dev/packages/stream_chat_flutter_core/changelog). +- Added OpenGraph preview support for links in `StreamMessageInput`. + +🐞 Fixed + +- Minor fixes and improvements + ## 3.5.1 πŸ›‘οΈ Breaking Changes diff --git a/packages/stream_chat_flutter/example/lib/main.dart b/packages/stream_chat_flutter/example/lib/main.dart index 4a7eabf40..7b0156898 100644 --- a/packages/stream_chat_flutter/example/lib/main.dart +++ b/packages/stream_chat_flutter/example/lib/main.dart @@ -87,7 +87,8 @@ class MyApp extends StatelessWidget { /// A list of messages sent in the current channel. /// -/// This is implemented using [StreamMessageListView], a widget that provides query +/// This is implemented using [StreamMessageListView], +/// a widget that provides query /// functionalities fetching the messages from the api and showing them in a /// listView. class ChannelPage extends StatelessWidget { diff --git a/packages/stream_chat_flutter/example/lib/tutorial_part_1.dart b/packages/stream_chat_flutter/example/lib/tutorial_part_1.dart index cd3bb12eb..2c43230ee 100644 --- a/packages/stream_chat_flutter/example/lib/tutorial_part_1.dart +++ b/packages/stream_chat_flutter/example/lib/tutorial_part_1.dart @@ -27,7 +27,8 @@ import 'package:stream_chat_flutter/stream_chat_flutter.dart'; /// - We make [StreamChat] the root Widget of our application /// /// - We create a single [ChannelPage] widget under [StreamChat] with three -/// widgets: [StreamChannelHeader], [StreamMessageListView] and [StreamMessageInput] +/// widgets: [StreamChannelHeader], [StreamMessageListView] +/// and [StreamMessageInput] /// /// If you now run the simulator you will see a single channel UI. void main() async { diff --git a/packages/stream_chat_flutter/example/lib/tutorial_part_2.dart b/packages/stream_chat_flutter/example/lib/tutorial_part_2.dart index 0ca2356ed..a46043e36 100644 --- a/packages/stream_chat_flutter/example/lib/tutorial_part_2.dart +++ b/packages/stream_chat_flutter/example/lib/tutorial_part_2.dart @@ -25,7 +25,8 @@ import 'package:stream_chat_flutter/stream_chat_flutter.dart'; /// The [ChannelListPage] widget retrieves the list of channels based on a /// custom query and ordering. In this case we are showing the list of /// channels in which the current user is a member and we order them based -/// on the time they had a new message. [StreamChannelListView] handles pagination +/// on the time they had a new message. +/// [StreamChannelListView] handles pagination /// and updates automatically when new channels are created or when a new /// message is added to a channel. void main() async { diff --git a/packages/stream_chat_flutter/example/lib/tutorial_part_3.dart b/packages/stream_chat_flutter/example/lib/tutorial_part_3.dart index 8eb01fbb1..aec63c575 100644 --- a/packages/stream_chat_flutter/example/lib/tutorial_part_3.dart +++ b/packages/stream_chat_flutter/example/lib/tutorial_part_3.dart @@ -15,9 +15,10 @@ import 'package:stream_chat_flutter/stream_chat_flutter.dart'; /// We start by changing how channel previews are shown in the channel list /// and include the number of unread messages for each. /// -/// We're passing a custom widget to [StreamChannelListView.channelPreviewBuilder]; -/// this will override the default [StreamChannelPreview] and allows you to create -/// one yourself. +/// We're passing a custom widget +/// to [StreamChannelListView.channelPreviewBuilder]; +/// this will override the default [StreamChannelPreview] and allows you +/// to create one yourself. /// /// There are a couple interesting things we do in this widget: /// diff --git a/packages/stream_chat_flutter/example/lib/tutorial_part_4.dart b/packages/stream_chat_flutter/example/lib/tutorial_part_4.dart index 89aa55f7b..5a4d13fe2 100644 --- a/packages/stream_chat_flutter/example/lib/tutorial_part_4.dart +++ b/packages/stream_chat_flutter/example/lib/tutorial_part_4.dart @@ -8,8 +8,10 @@ import 'package:stream_chat_flutter/stream_chat_flutter.dart'; /// to create sub-conversations inside the same channel. /// /// Using threaded conversations is very simple and mostly a matter of -/// plugging the [StreamMessageListView] to another widget that renders the widget. -/// To make this simple, such a widget only needs to build [StreamMessageListView] +/// plugging the [StreamMessageListView] +/// to another widget that renders the widget. +/// To make this simple, such a widget only needs +/// to build [StreamMessageListView] /// with the parent attribute set to the thread’s root message. /// /// Now we can open threads and create new ones as well. If you long-press a diff --git a/packages/stream_chat_flutter/lib/src/attachment_actions_modal.dart b/packages/stream_chat_flutter/lib/src/attachment_actions_modal.dart index 41e6fd116..a1b20450d 100644 --- a/packages/stream_chat_flutter/lib/src/attachment_actions_modal.dart +++ b/packages/stream_chat_flutter/lib/src/attachment_actions_modal.dart @@ -58,7 +58,8 @@ class AttachmentActionsModal extends StatelessWidget { /// List of custom actions final List customActions; - /// Creates a copy of [StreamMessageWidget] with specified attributes overridden. + /// Creates a copy of [StreamMessageWidget] with + /// specified attributes overridden. AttachmentActionsModal copyWith({ Key? key, int? currentIndex, diff --git a/packages/stream_chat_flutter/lib/src/localization/translations.dart b/packages/stream_chat_flutter/lib/src/localization/translations.dart index 2a87e76d3..83682c6d3 100644 --- a/packages/stream_chat_flutter/lib/src/localization/translations.dart +++ b/packages/stream_chat_flutter/lib/src/localization/translations.dart @@ -1,8 +1,8 @@ import 'package:jiffy/jiffy.dart'; import 'package:stream_chat_flutter/src/connection_status_builder.dart'; -import 'package:stream_chat_flutter/src/message_input/message_input.dart'; import 'package:stream_chat_flutter/src/message_list_view.dart'; import 'package:stream_chat_flutter/src/message_search_list_view.dart'; +import 'package:stream_chat_flutter/src/v4/message_input/stream_message_input.dart'; import 'package:stream_chat_flutter_core/stream_chat_flutter_core.dart' show User; @@ -87,7 +87,8 @@ abstract class Translations { /// The label for "reconnecting" in [StreamConnectionStatusBuilder] String get reconnectingLabel; - /// The label for also send as direct message "checkbox"" in [StreamMessageInput] + /// The label for also send + /// as direct message "checkbox"" in [StreamMessageInput] String get alsoSendAsDirectMessageLabel; /// The label for search Gif diff --git a/packages/stream_chat_flutter/lib/src/message_widget.dart b/packages/stream_chat_flutter/lib/src/message_widget.dart index 05bff7ba3..3108803e9 100644 --- a/packages/stream_chat_flutter/lib/src/message_widget.dart +++ b/packages/stream_chat_flutter/lib/src/message_widget.dart @@ -428,7 +428,8 @@ class StreamMessageWidget extends StatefulWidget { /// Customize onTap on attachment final void Function(Message message, Attachment attachment)? onAttachmentTap; - /// Creates a copy of [StreamMessageWidget] with specified attributes overridden. + /// Creates a copy of [StreamMessageWidget] with + /// specified attributes overridden. StreamMessageWidget copyWith({ Key? key, void Function(User)? onMentionTap, diff --git a/packages/stream_chat_flutter/lib/src/theme/channel_list_header_theme.dart b/packages/stream_chat_flutter/lib/src/theme/channel_list_header_theme.dart index 7cff2b907..87ba01276 100644 --- a/packages/stream_chat_flutter/lib/src/theme/channel_list_header_theme.dart +++ b/packages/stream_chat_flutter/lib/src/theme/channel_list_header_theme.dart @@ -12,7 +12,8 @@ typedef ChannelListHeaderTheme = StreamChannelListHeaderTheme; /// /// See also: /// -/// * [StreamChannelListHeaderThemeData], which is used to configure this theme. +/// * [StreamChannelListHeaderThemeData], which is used +/// to configure this theme. /// {@endtemplate} class StreamChannelListHeaderTheme extends InheritedTheme { /// Creates a [StreamChannelListHeaderTheme]. @@ -90,7 +91,8 @@ class StreamChannelListHeaderThemeData with Diagnosticable { color: color ?? this.color, ); - /// Linearly interpolate from one [StreamChannelListHeaderThemeData] to another. + /// Linearly interpolate from one [StreamChannelListHeaderThemeData] + /// to another. StreamChannelListHeaderThemeData lerp( StreamChannelListHeaderThemeData a, StreamChannelListHeaderThemeData b, diff --git a/packages/stream_chat_flutter/lib/src/theme/channel_list_view_theme.dart b/packages/stream_chat_flutter/lib/src/theme/channel_list_view_theme.dart index 4d6bd7d09..d3ed33eb0 100644 --- a/packages/stream_chat_flutter/lib/src/theme/channel_list_view_theme.dart +++ b/packages/stream_chat_flutter/lib/src/theme/channel_list_view_theme.dart @@ -58,12 +58,14 @@ typedef ChannelListViewThemeData = StreamChannelListViewThemeData; /// {@template channel_list_view_theme_data} /// A style that overrides the default appearance of [ChannelListView]s when -/// used with [StreamChannelListViewTheme] or with the overall [StreamChatTheme]'s +/// used with [StreamChannelListViewTheme] +/// or with the overall [StreamChatTheme]'s /// [StreamChatThemeData.channelListViewTheme]. /// /// See also: /// -/// * [StreamChannelListViewTheme], the theme which is configured with this class. +/// * [StreamChannelListViewTheme], the theme +/// which is configured with this class. /// * [StreamChatThemeData.channelListViewTheme], which can be used to override /// the default style for [ChannelListView]s below the overall /// [StreamChatTheme]. diff --git a/packages/stream_chat_flutter/lib/src/theme/channel_preview_theme.dart b/packages/stream_chat_flutter/lib/src/theme/channel_preview_theme.dart index 3df974b2c..e89ce4a6e 100644 --- a/packages/stream_chat_flutter/lib/src/theme/channel_preview_theme.dart +++ b/packages/stream_chat_flutter/lib/src/theme/channel_preview_theme.dart @@ -64,7 +64,8 @@ typedef ChannelPreviewThemeData = StreamChannelPreviewThemeData; /// /// See also: /// -/// * [StreamChannelPreviewTheme], the theme which is configured with this class. +/// * [StreamChannelPreviewTheme], the theme +/// which is configured with this class. /// * [StreamChatThemeData.channelPreviewTheme], which can be used to override /// the default style for [ChannelHeader]s below the overall [StreamChatTheme]. /// {@endtemplate} diff --git a/packages/stream_chat_flutter/lib/src/theme/message_input_theme.dart b/packages/stream_chat_flutter/lib/src/theme/message_input_theme.dart index c3874ef69..bd78bd1b1 100644 --- a/packages/stream_chat_flutter/lib/src/theme/message_input_theme.dart +++ b/packages/stream_chat_flutter/lib/src/theme/message_input_theme.dart @@ -61,7 +61,8 @@ typedef MessageInputThemeData = StreamMessageInputThemeData; /// {@template message_input_theme_data} /// A style that overrides the default appearance of [MessageInput] widgets -/// when used with [StreamMessageInputTheme] or with the overall [StreamChatTheme]'s +/// when used with [StreamMessageInputTheme] +/// or with the overall [StreamChatTheme]'s /// [StreamChatThemeData.messageInputTheme]. /// {@endtemplate} class StreamMessageInputThemeData with Diagnosticable { @@ -133,7 +134,8 @@ class StreamMessageInputThemeData with Diagnosticable { /// Shadow for the [MessageInput] widget final BoxShadow? shadow; - /// Returns a new [StreamMessageInputThemeData] replacing some of its properties + /// Returns a new [StreamMessageInputThemeData] + /// replacing some of its properties StreamMessageInputThemeData copyWith({ Duration? sendAnimationDuration, Color? inputBackgroundColor, diff --git a/packages/stream_chat_flutter/lib/src/theme/message_list_view_theme.dart b/packages/stream_chat_flutter/lib/src/theme/message_list_view_theme.dart index 882d47081..e882a9f69 100644 --- a/packages/stream_chat_flutter/lib/src/theme/message_list_view_theme.dart +++ b/packages/stream_chat_flutter/lib/src/theme/message_list_view_theme.dart @@ -58,12 +58,14 @@ typedef MessageListViewThemeData = StreamMessageListViewThemeData; /// {@template message_list_view_theme_data} /// A style that overrides the default appearance of [MessageListView]s when -/// used with [StreamMessageListViewTheme] or with the overall [StreamChatTheme]'s +/// used with [StreamMessageListViewTheme] or with +/// the overall [StreamChatTheme]'s /// [StreamChatThemeData.messageListViewTheme]. /// /// See also: /// -/// * [StreamMessageListViewTheme], the theme which is configured with this class. +/// * [StreamMessageListViewTheme], the theme +/// which is configured with this class. /// * [StreamChatThemeData.messageListViewTheme], which can be used to override /// the default style for [MessageListView]s below the overall /// [StreamChatTheme]. diff --git a/packages/stream_chat_flutter/lib/src/theme/message_search_list_view_theme.dart b/packages/stream_chat_flutter/lib/src/theme/message_search_list_view_theme.dart index 83ef032ad..535846aef 100644 --- a/packages/stream_chat_flutter/lib/src/theme/message_search_list_view_theme.dart +++ b/packages/stream_chat_flutter/lib/src/theme/message_search_list_view_theme.dart @@ -63,8 +63,8 @@ typedef MessageSearchListViewThemeData = StreamMessageSearchListViewThemeData; /// /// See also: /// -/// * [StreamMessageSearchListViewTheme], the theme which is configured with this -/// class. +/// * [StreamMessageSearchListViewTheme], the theme +/// which is configured with this class. /// * [StreamChatThemeData.messageSearchListViewTheme], which can be used to /// override the default style for [UserListView]s below the overall /// [StreamChatTheme]. diff --git a/packages/stream_chat_flutter/lib/src/v4/channel_list_view/stream_channel_list_tile.dart b/packages/stream_chat_flutter/lib/src/v4/channel_list_view/stream_channel_list_tile.dart index 16fcc5cce..f54c6db9d 100644 --- a/packages/stream_chat_flutter/lib/src/v4/channel_list_view/stream_channel_list_tile.dart +++ b/packages/stream_chat_flutter/lib/src/v4/channel_list_view/stream_channel_list_tile.dart @@ -1,16 +1,7 @@ import 'package:collection/collection.dart'; import 'package:flutter/material.dart'; -import 'package:jiffy/jiffy.dart'; import 'package:stream_chat_flutter/src/extension.dart'; -import 'package:stream_chat_flutter/src/sending_indicator.dart'; -import 'package:stream_chat_flutter/src/stream_svg_icon.dart'; -import 'package:stream_chat_flutter/src/theme/channel_preview_theme.dart'; -import 'package:stream_chat_flutter/src/typing_indicator.dart'; -import 'package:stream_chat_flutter/src/unread_indicator.dart'; -import 'package:stream_chat_flutter/src/v4/stream_channel_avatar.dart'; -import 'package:stream_chat_flutter/src/v4/stream_channel_name.dart'; import 'package:stream_chat_flutter/stream_chat_flutter.dart'; -import 'package:stream_chat_flutter_core/stream_chat_flutter_core.dart'; /// A widget that displays a channel preview. /// diff --git a/packages/stream_chat_flutter/lib/src/message_input/countdown_button.dart b/packages/stream_chat_flutter/lib/src/v4/message_input/countdown_button.dart similarity index 100% rename from packages/stream_chat_flutter/lib/src/message_input/countdown_button.dart rename to packages/stream_chat_flutter/lib/src/v4/message_input/countdown_button.dart diff --git a/packages/stream_chat_flutter/lib/src/message_input/simple_safe_area.dart b/packages/stream_chat_flutter/lib/src/v4/message_input/simple_safe_area.dart similarity index 100% rename from packages/stream_chat_flutter/lib/src/message_input/simple_safe_area.dart rename to packages/stream_chat_flutter/lib/src/v4/message_input/simple_safe_area.dart diff --git a/packages/stream_chat_flutter/lib/src/message_input/stream_attachment_picker.dart b/packages/stream_chat_flutter/lib/src/v4/message_input/stream_attachment_picker.dart similarity index 99% rename from packages/stream_chat_flutter/lib/src/message_input/stream_attachment_picker.dart rename to packages/stream_chat_flutter/lib/src/v4/message_input/stream_attachment_picker.dart index 8389d3c76..cb3859be9 100644 --- a/packages/stream_chat_flutter/lib/src/message_input/stream_attachment_picker.dart +++ b/packages/stream_chat_flutter/lib/src/v4/message_input/stream_attachment_picker.dart @@ -352,7 +352,7 @@ class _StreamAttachmentPickerState extends State { if (mediaFile == null) return; - var file = AttachmentFile( + final file = AttachmentFile( path: mediaFile.path, size: await mediaFile.length(), bytes: mediaFile.readAsBytesSync(), diff --git a/packages/stream_chat_flutter/lib/src/message_input/message_input.dart b/packages/stream_chat_flutter/lib/src/v4/message_input/stream_message_input.dart similarity index 99% rename from packages/stream_chat_flutter/lib/src/message_input/message_input.dart rename to packages/stream_chat_flutter/lib/src/v4/message_input/stream_message_input.dart index 0ffa472ca..085b021a5 100644 --- a/packages/stream_chat_flutter/lib/src/message_input/message_input.dart +++ b/packages/stream_chat_flutter/lib/src/v4/message_input/stream_message_input.dart @@ -13,11 +13,11 @@ import 'package:stream_chat_flutter/src/commands_overlay.dart'; import 'package:stream_chat_flutter/src/emoji/emoji.dart'; import 'package:stream_chat_flutter/src/emoji_overlay.dart'; import 'package:stream_chat_flutter/src/extension.dart'; -import 'package:stream_chat_flutter/src/message_input/simple_safe_area.dart'; -import 'package:stream_chat_flutter/src/message_input/tld.dart'; import 'package:stream_chat_flutter/src/multi_overlay.dart'; import 'package:stream_chat_flutter/src/quoted_message_widget.dart'; import 'package:stream_chat_flutter/src/user_mentions_overlay.dart'; +import 'package:stream_chat_flutter/src/v4/message_input/simple_safe_area.dart'; +import 'package:stream_chat_flutter/src/v4/message_input/tld.dart'; import 'package:stream_chat_flutter/src/video_thumbnail_image.dart'; import 'package:stream_chat_flutter/stream_chat_flutter.dart'; @@ -34,7 +34,8 @@ typedef ErrorListener = void Function( StackTrace? stackTrace, ); -/// A callback that can be passed to [StreamMessageInput.onAttachmentLimitExceed]. +/// A callback that can be passed to +/// [StreamMessageInput.onAttachmentLimitExceed]. /// /// This callback should not throw. /// diff --git a/packages/stream_chat_flutter/lib/src/message_input/stream_message_send_button.dart b/packages/stream_chat_flutter/lib/src/v4/message_input/stream_message_send_button.dart similarity index 100% rename from packages/stream_chat_flutter/lib/src/message_input/stream_message_send_button.dart rename to packages/stream_chat_flutter/lib/src/v4/message_input/stream_message_send_button.dart diff --git a/packages/stream_chat_flutter/lib/src/message_input/stream_message_text_field.dart b/packages/stream_chat_flutter/lib/src/v4/message_input/stream_message_text_field.dart similarity index 100% rename from packages/stream_chat_flutter/lib/src/message_input/stream_message_text_field.dart rename to packages/stream_chat_flutter/lib/src/v4/message_input/stream_message_text_field.dart diff --git a/packages/stream_chat_flutter/lib/src/message_input/tld.dart b/packages/stream_chat_flutter/lib/src/v4/message_input/tld.dart similarity index 100% rename from packages/stream_chat_flutter/lib/src/message_input/tld.dart rename to packages/stream_chat_flutter/lib/src/v4/message_input/tld.dart diff --git a/packages/stream_chat_flutter/lib/stream_chat_flutter.dart b/packages/stream_chat_flutter/lib/stream_chat_flutter.dart index e63db686d..4b129d1f8 100644 --- a/packages/stream_chat_flutter/lib/stream_chat_flutter.dart +++ b/packages/stream_chat_flutter/lib/stream_chat_flutter.dart @@ -23,11 +23,6 @@ export 'src/localization/stream_chat_localizations.dart'; export 'src/localization/translations.dart' show DefaultTranslations; export 'src/message_action.dart'; export 'src/message_input.dart' show MessageInput, MessageInputState; -export 'src/message_input/countdown_button.dart'; -export 'src/message_input/message_input.dart'; -export 'src/message_input/stream_attachment_picker.dart'; -export 'src/message_input/stream_message_send_button.dart'; -export 'src/message_input/stream_message_text_field.dart'; export 'src/message_list_view.dart'; export 'src/message_search_item.dart'; export 'src/message_search_list_view.dart'; @@ -51,11 +46,15 @@ export 'src/user_item.dart'; export 'src/user_list_view.dart'; export 'src/user_mention_tile.dart'; export 'src/utils.dart'; - // v4 export 'src/v4/channel_list_view/stream_channel_list_loading_tile.dart'; export 'src/v4/channel_list_view/stream_channel_list_tile.dart'; export 'src/v4/channel_list_view/stream_channel_list_view.dart'; +export 'src/v4/message_input/countdown_button.dart'; +export 'src/v4/message_input/stream_attachment_picker.dart'; +export 'src/v4/message_input/stream_message_input.dart'; +export 'src/v4/message_input/stream_message_send_button.dart'; +export 'src/v4/message_input/stream_message_text_field.dart'; export 'src/v4/stream_channel_avatar.dart'; export 'src/v4/stream_channel_info_bottom_sheet.dart'; export 'src/v4/stream_channel_name.dart'; diff --git a/packages/stream_chat_flutter/pubspec.yaml b/packages/stream_chat_flutter/pubspec.yaml index 7305d74b5..8fc47ac26 100644 --- a/packages/stream_chat_flutter/pubspec.yaml +++ b/packages/stream_chat_flutter/pubspec.yaml @@ -1,7 +1,7 @@ name: stream_chat_flutter homepage: https://github.com/GetStream/stream-chat-flutter description: Stream Chat official Flutter SDK. Build your own chat experience using Dart and Flutter. -version: 3.5.1 +version: 4.0.0-beta.0 repository: https://github.com/GetStream/stream-chat-flutter issue_tracker: https://github.com/GetStream/stream-chat-flutter/issues diff --git a/packages/stream_chat_flutter_core/CHANGELOG.md b/packages/stream_chat_flutter_core/CHANGELOG.md index ab1e25046..1fb6c1644 100644 --- a/packages/stream_chat_flutter_core/CHANGELOG.md +++ b/packages/stream_chat_flutter_core/CHANGELOG.md @@ -1,3 +1,14 @@ +## 4.0.0-beta.0 + +βœ… Added + +- Added `MessageInputController` to hold `Message` related data. +- Deprecated old widgets in favor of Stream-prefixed ones. +- Deprecated `ChannelsBloc` in favor of `StreamChannelListController` to control the channel list. +- Added `MessageTextFieldController` to be used with the new `StreamTextField` ui widget. + +- Updated `stream_chat` dependency to [`4.0.0-beta.0`](https://pub.dev/packages/stream_chat/changelog). + ## 3.5.1 - Updated `stream_chat` dependency to [`3.5.1`](https://pub.dev/packages/stream_chat/changelog). @@ -9,10 +20,6 @@ ## 3.4.0 - Updated `stream_chat` dependency to [`3.4.0`](https://pub.dev/packages/stream_chat/changelog). -βœ… Added - -- Added `MessageInputController` to hold `Message` related data. - 🐞 Fixed - Do not move a channel to top if the new message is from a thread. diff --git a/packages/stream_chat_flutter_core/pubspec.yaml b/packages/stream_chat_flutter_core/pubspec.yaml index 09ce37338..4e5e39b7e 100644 --- a/packages/stream_chat_flutter_core/pubspec.yaml +++ b/packages/stream_chat_flutter_core/pubspec.yaml @@ -1,7 +1,7 @@ name: stream_chat_flutter_core homepage: https://github.com/GetStream/stream-chat-flutter description: Stream Chat official Flutter SDK Core. Build your own chat experience using Dart and Flutter. -version: 3.5.1 +version: 4.0.0-beta.0 repository: https://github.com/GetStream/stream-chat-flutter issue_tracker: https://github.com/GetStream/stream-chat-flutter/issues @@ -17,7 +17,7 @@ dependencies: freezed_annotation: ^1.0.0 meta: ^1.3.0 rxdart: ^0.27.0 - stream_chat: ^3.5.1 + stream_chat: ^4.0.0-beta.0 dev_dependencies: build_runner: ^2.0.1 diff --git a/packages/stream_chat_localizations/CHANGELOG.md b/packages/stream_chat_localizations/CHANGELOG.md index 94dc71c33..1e4f4c35b 100644 --- a/packages/stream_chat_localizations/CHANGELOG.md +++ b/packages/stream_chat_localizations/CHANGELOG.md @@ -1,3 +1,7 @@ +## 3.0.0-beta.0 + +* Updated `stream_chat_flutter` dependency to [`4.0.0-beta.0`](https://pub.dev/packages/stream_chat_flutter/changelog). + ## 2.1.0 βœ… Added diff --git a/packages/stream_chat_localizations/pubspec.yaml b/packages/stream_chat_localizations/pubspec.yaml index 00606a7b2..02bc10754 100644 --- a/packages/stream_chat_localizations/pubspec.yaml +++ b/packages/stream_chat_localizations/pubspec.yaml @@ -1,6 +1,6 @@ name: stream_chat_localizations description: The Official localizations for Stream Chat Flutter, a service for building chat applications -version: 2.1.0 +version: 3.0.0-beta.0 homepage: https://github.com/GetStream/stream-chat-flutter repository: https://github.com/GetStream/stream-chat-flutter issue_tracker: https://github.com/GetStream/stream-chat-flutter/issues @@ -14,7 +14,7 @@ dependencies: sdk: flutter flutter_localizations: sdk: flutter - stream_chat_flutter: ^3.4.0 + stream_chat_flutter: ^4.0.0-beta.0 dev_dependencies: dart_code_metrics: ^4.4.0 diff --git a/packages/stream_chat_persistence/CHANGELOG.md b/packages/stream_chat_persistence/CHANGELOG.md index ea67fa880..5e80bd625 100644 --- a/packages/stream_chat_persistence/CHANGELOG.md +++ b/packages/stream_chat_persistence/CHANGELOG.md @@ -1,3 +1,7 @@ +## 4.0.0-beta.0 + +- Updated `stream_chat` dependency to [`4.0.0-beta.0`](https://pub.dev/packages/stream_chat/changelog). + ## 3.1.0 - Bump `drift` to `1.3.0`. diff --git a/packages/stream_chat_persistence/pubspec.yaml b/packages/stream_chat_persistence/pubspec.yaml index 06167a117..0d28870e8 100644 --- a/packages/stream_chat_persistence/pubspec.yaml +++ b/packages/stream_chat_persistence/pubspec.yaml @@ -1,7 +1,7 @@ name: stream_chat_persistence homepage: https://github.com/GetStream/stream-chat-flutter description: Official Stream Chat Persistence library. Build your own chat experience using Dart and Flutter. -version: 3.1.0 +version: 4.0.0-beta.0 repository: https://github.com/GetStream/stream-chat-flutter issue_tracker: https://github.com/GetStream/stream-chat-flutter/issues @@ -19,7 +19,7 @@ dependencies: path: ^1.8.0 path_provider: ^2.0.1 sqlite3_flutter_libs: ^0.5.0 - stream_chat: ^3.4.0 + stream_chat: ^4.0.0-beta.0 dev_dependencies: build_runner: ^2.0.1 From 9eefb74600075eadaf9b0cfac951eda37fb861d3 Mon Sep 17 00:00:00 2001 From: Salvatore Giordano Date: Wed, 23 Mar 2022 11:34:44 +0100 Subject: [PATCH 2/6] remove log --- .../lib/src/stream_channel_list_controller.dart | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/stream_chat_flutter_core/lib/src/stream_channel_list_controller.dart b/packages/stream_chat_flutter_core/lib/src/stream_channel_list_controller.dart index 3b7342e53..b7ca36c9e 100644 --- a/packages/stream_chat_flutter_core/lib/src/stream_channel_list_controller.dart +++ b/packages/stream_chat_flutter_core/lib/src/stream_channel_list_controller.dart @@ -221,7 +221,6 @@ class StreamChannelListController extends PagedValueNotifier { } _channelEventSubscription = client.on().listen((event) { - print('event.type: ${event.type}'); // Returns early if the event is already handled by the listener. if (eventListener?.call(event) ?? false) return; From 363c95148e6a402733a0e5e84f8636d251383fa4 Mon Sep 17 00:00:00 2001 From: Salvatore Giordano Date: Wed, 23 Mar 2022 14:25:51 +0100 Subject: [PATCH 3/6] update changelog --- packages/stream_chat_flutter/CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/stream_chat_flutter/CHANGELOG.md b/packages/stream_chat_flutter/CHANGELOG.md index d116d50d3..f26f3fcb1 100644 --- a/packages/stream_chat_flutter/CHANGELOG.md +++ b/packages/stream_chat_flutter/CHANGELOG.md @@ -12,6 +12,7 @@ - Separated `MessageInput` widget in smaller components. (For example `CountDownButton`, `StreamAttachmentPicker`...) - Updated `stream_chat_flutter_core` dependency to [`4.0.0-beta.0`](https://pub.dev/packages/stream_chat_flutter_core/changelog). - Added OpenGraph preview support for links in `StreamMessageInput`. +- Removed video compression. 🐞 Fixed From a0f353373e76c7118904bc65375b2f74f47deb26 Mon Sep 17 00:00:00 2001 From: Salvatore Giordano Date: Wed, 23 Mar 2022 14:47:57 +0100 Subject: [PATCH 4/6] fix format --- packages/stream_chat_flutter/example/lib/main.dart | 2 +- packages/stream_chat_flutter/example/lib/tutorial_part_1.dart | 2 +- packages/stream_chat_flutter/example/lib/tutorial_part_2.dart | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/stream_chat_flutter/example/lib/main.dart b/packages/stream_chat_flutter/example/lib/main.dart index 7b0156898..ab8d0dfc8 100644 --- a/packages/stream_chat_flutter/example/lib/main.dart +++ b/packages/stream_chat_flutter/example/lib/main.dart @@ -87,7 +87,7 @@ class MyApp extends StatelessWidget { /// A list of messages sent in the current channel. /// -/// This is implemented using [StreamMessageListView], +/// This is implemented using [StreamMessageListView], /// a widget that provides query /// functionalities fetching the messages from the api and showing them in a /// listView. diff --git a/packages/stream_chat_flutter/example/lib/tutorial_part_1.dart b/packages/stream_chat_flutter/example/lib/tutorial_part_1.dart index 2c43230ee..7c73693e9 100644 --- a/packages/stream_chat_flutter/example/lib/tutorial_part_1.dart +++ b/packages/stream_chat_flutter/example/lib/tutorial_part_1.dart @@ -27,7 +27,7 @@ import 'package:stream_chat_flutter/stream_chat_flutter.dart'; /// - We make [StreamChat] the root Widget of our application /// /// - We create a single [ChannelPage] widget under [StreamChat] with three -/// widgets: [StreamChannelHeader], [StreamMessageListView] +/// widgets: [StreamChannelHeader], [StreamMessageListView] /// and [StreamMessageInput] /// /// If you now run the simulator you will see a single channel UI. diff --git a/packages/stream_chat_flutter/example/lib/tutorial_part_2.dart b/packages/stream_chat_flutter/example/lib/tutorial_part_2.dart index a46043e36..8f2ba8b15 100644 --- a/packages/stream_chat_flutter/example/lib/tutorial_part_2.dart +++ b/packages/stream_chat_flutter/example/lib/tutorial_part_2.dart @@ -25,7 +25,7 @@ import 'package:stream_chat_flutter/stream_chat_flutter.dart'; /// The [ChannelListPage] widget retrieves the list of channels based on a /// custom query and ordering. In this case we are showing the list of /// channels in which the current user is a member and we order them based -/// on the time they had a new message. +/// on the time they had a new message. /// [StreamChannelListView] handles pagination /// and updates automatically when new channels are created or when a new /// message is added to a channel. From 21a8110bd28df3a769351ce735025b2411db06d1 Mon Sep 17 00:00:00 2001 From: Salvatore Giordano Date: Wed, 23 Mar 2022 16:36:03 +0100 Subject: [PATCH 5/6] fix format --- .../lib/src/v4/stream_channel_info_bottom_sheet.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/stream_chat_flutter/lib/src/v4/stream_channel_info_bottom_sheet.dart b/packages/stream_chat_flutter/lib/src/v4/stream_channel_info_bottom_sheet.dart index 1a219e919..986a9cb31 100644 --- a/packages/stream_chat_flutter/lib/src/v4/stream_channel_info_bottom_sheet.dart +++ b/packages/stream_chat_flutter/lib/src/v4/stream_channel_info_bottom_sheet.dart @@ -1,5 +1,4 @@ import 'package:flutter/material.dart'; -import 'package:stream_chat/stream_chat.dart'; import 'package:stream_chat_flutter/src/channel_info.dart'; import 'package:stream_chat_flutter/src/extension.dart'; import 'package:stream_chat_flutter/src/option_list_tile.dart'; @@ -8,6 +7,7 @@ import 'package:stream_chat_flutter/src/stream_svg_icon.dart'; import 'package:stream_chat_flutter/src/theme/themes.dart'; import 'package:stream_chat_flutter/src/user_avatar.dart'; import 'package:stream_chat_flutter/src/v4/stream_channel_name.dart'; +import 'package:stream_chat_flutter_core/stream_chat_flutter_core.dart'; /// A [BottomSheet] that shows information about a [Channel]. class StreamChannelInfoBottomSheet extends StatelessWidget { From a8e04e84282489791ef05e60e22db8030ce8a14a Mon Sep 17 00:00:00 2001 From: Salvatore Giordano Date: Wed, 23 Mar 2022 16:49:16 +0100 Subject: [PATCH 6/6] fix imports --- packages/stream_chat_flutter/CHANGELOG.md | 2 +- packages/stream_chat_flutter/pubspec.yaml | 4 ++-- packages/stream_chat_localizations/CHANGELOG.md | 4 ++-- packages/stream_chat_localizations/pubspec.yaml | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/stream_chat_flutter/CHANGELOG.md b/packages/stream_chat_flutter/CHANGELOG.md index f26f3fcb1..c26bfa2df 100644 --- a/packages/stream_chat_flutter/CHANGELOG.md +++ b/packages/stream_chat_flutter/CHANGELOG.md @@ -1,4 +1,4 @@ -## 4.0.0-beta.0 +## 4.0.0-beta.1 βœ… Added diff --git a/packages/stream_chat_flutter/pubspec.yaml b/packages/stream_chat_flutter/pubspec.yaml index 8fc47ac26..872463869 100644 --- a/packages/stream_chat_flutter/pubspec.yaml +++ b/packages/stream_chat_flutter/pubspec.yaml @@ -1,7 +1,7 @@ name: stream_chat_flutter homepage: https://github.com/GetStream/stream-chat-flutter description: Stream Chat official Flutter SDK. Build your own chat experience using Dart and Flutter. -version: 4.0.0-beta.0 +version: 4.0.0-beta.1 repository: https://github.com/GetStream/stream-chat-flutter issue_tracker: https://github.com/GetStream/stream-chat-flutter/issues @@ -36,7 +36,7 @@ dependencies: rxdart: ^0.27.0 share_plus: ^4.0.1 shimmer: ^2.0.0 - stream_chat_flutter_core: ^3.5.1 + stream_chat_flutter_core: ^4.0.0-beta.0 substring_highlight: ^1.0.26 url_launcher: ^6.0.3 video_player: ^2.1.0 diff --git a/packages/stream_chat_localizations/CHANGELOG.md b/packages/stream_chat_localizations/CHANGELOG.md index 1e4f4c35b..2a8addab5 100644 --- a/packages/stream_chat_localizations/CHANGELOG.md +++ b/packages/stream_chat_localizations/CHANGELOG.md @@ -1,6 +1,6 @@ -## 3.0.0-beta.0 +## 3.0.0-beta.1 -* Updated `stream_chat_flutter` dependency to [`4.0.0-beta.0`](https://pub.dev/packages/stream_chat_flutter/changelog). +* Updated `stream_chat_flutter` dependency to [`4.0.0-beta.1`](https://pub.dev/packages/stream_chat_flutter/changelog). ## 2.1.0 diff --git a/packages/stream_chat_localizations/pubspec.yaml b/packages/stream_chat_localizations/pubspec.yaml index 02bc10754..a47eabbb9 100644 --- a/packages/stream_chat_localizations/pubspec.yaml +++ b/packages/stream_chat_localizations/pubspec.yaml @@ -1,6 +1,6 @@ name: stream_chat_localizations description: The Official localizations for Stream Chat Flutter, a service for building chat applications -version: 3.0.0-beta.0 +version: 3.0.0-beta.1 homepage: https://github.com/GetStream/stream-chat-flutter repository: https://github.com/GetStream/stream-chat-flutter issue_tracker: https://github.com/GetStream/stream-chat-flutter/issues @@ -14,7 +14,7 @@ dependencies: sdk: flutter flutter_localizations: sdk: flutter - stream_chat_flutter: ^4.0.0-beta.0 + stream_chat_flutter: ^4.0.0-beta.1 dev_dependencies: dart_code_metrics: ^4.4.0