From 9c05625f9b72b679da37a63addb84c2a40d8ee36 Mon Sep 17 00:00:00 2001 From: Salvatore Giordano Date: Tue, 3 May 2022 09:48:41 +0200 Subject: [PATCH 1/5] update changelogs and readmes --- packages/stream_chat/CHANGELOG.md | 2 ++ packages/stream_chat/README.md | 4 ++++ packages/stream_chat_flutter/CHANGELOG.md | 3 +++ packages/stream_chat_flutter/README.md | 20 +++++++++---------- .../stream_chat_flutter_core/CHANGELOG.md | 2 ++ packages/stream_chat_flutter_core/README.md | 4 ++++ 6 files changed, 25 insertions(+), 10 deletions(-) diff --git a/packages/stream_chat/CHANGELOG.md b/packages/stream_chat/CHANGELOG.md index 696bbf2c8..131427115 100644 --- a/packages/stream_chat/CHANGELOG.md +++ b/packages/stream_chat/CHANGELOG.md @@ -1,5 +1,7 @@ ## 4.0.0 +For upgrading to V4, please refer to the [V4 Migration Guide](https://getstream.io/chat/docs/sdk/flutter/guides/migration_guide_4_0/) + ✅ Added - Added `push_provider_name` to `addDevice` API call diff --git a/packages/stream_chat/README.md b/packages/stream_chat/README.md index 74afad4c2..bb1eab751 100644 --- a/packages/stream_chat/README.md +++ b/packages/stream_chat/README.md @@ -13,6 +13,10 @@ - [Chat UI Kit](https://getstream.io/chat/ui-kit/) - [Chat Client Docs](https://getstream.io/chat/docs/flutter-dart/?language=dart) +**V4 Migration Guide** + +For upgrading from V3 to V4, please refer to the [V4 Migration Guide](https://getstream.io/chat/docs/sdk/flutter/guides/migration_guide_4_0/) + ### Changelog Check out the [changelog on pub.dev](https://pub.dev/packages/stream_chat/changelog) to see the latest changes in the package. diff --git a/packages/stream_chat_flutter/CHANGELOG.md b/packages/stream_chat_flutter/CHANGELOG.md index 0fdfd392a..3b4efb4ab 100644 --- a/packages/stream_chat_flutter/CHANGELOG.md +++ b/packages/stream_chat_flutter/CHANGELOG.md @@ -1,5 +1,7 @@ ## 4.0.0 +For upgrading to V4, please refer to the [V4 Migration Guide](https://getstream.io/chat/docs/sdk/flutter/guides/migration_guide_4_0/) + ✅ Added - [[#1087]](https://github.com/GetStream/stream-chat-flutter/issues/1087): Handle limited access to camera on iOS. @@ -11,6 +13,7 @@ - [[#842]](https://github.com/GetStream/stream-chat-flutter/issues/842): show date divider for first message. - Loosen up url check for attachment download. - Use `ogScrapeUrl` for LinkAttachments. + ## 4.0.0-beta.2 ✅ Added diff --git a/packages/stream_chat_flutter/README.md b/packages/stream_chat_flutter/README.md index 0e211a242..bcc9e9825 100644 --- a/packages/stream_chat_flutter/README.md +++ b/packages/stream_chat_flutter/README.md @@ -17,6 +17,10 @@ - [UI Docs](https://getstream.io/chat/docs/sdk/flutter/stream_chat_flutter/introduction/) - [Chat Client Docs](https://getstream.io/chat/docs/flutter-dart/?language=dart) +**V4 Migration Guide** + +For upgrading from V3 to V4, please refer to the [V4 Migration Guide](https://getstream.io/chat/docs/sdk/flutter/guides/migration_guide_4_0/) + ### Changelog Check out the [changelog on pub.dev](https://pub.dev/packages/stream_chat_flutter/changelog) to see the latest changes in the package. @@ -71,16 +75,12 @@ If you require the maximum amount of control over the API, please use the low le These are the available Widgets that you can use to build your application UI. Every widget uses the `StreamChat` or `StreamChannel` widgets to manage the state and communicate with Stream services. -- [StreamChannelHeader](https://pub.dev/documentation/stream_chat_flutter/latest/stream_chat_flutter/StreamChannelHeader-class.html) -- [StreamChannelAvatar](https://pub.dev/documentation/stream_chat_flutter/latest/stream_chat_flutter/StreamChannelAvatar-class.html) -- [StreamChannelListView](https://pub.dev/documentation/stream_chat_flutter/latest/stream_chat_flutter/StreamChannelListView-class.html) -- [StreamChannelName](https://pub.dev/documentation/stream_chat_flutter/latest/stream_chat_flutter/StreamChannelName-class.html) -- [StreamChannelListTile](https://pub.dev/documentation/stream_chat_flutter/latest/stream_chat_flutter/StreamChannelListTile-class.html) -- [StreamMessageInput](https://pub.dev/documentation/stream_chat_flutter/latest/stream_chat_flutter/StreamMessageInput-class.html) -- [StreamMessageListView](https://pub.dev/documentation/stream_chat_flutter/latest/stream_chat_flutter/StreamMessageListView-class.html) -- [StreamMessageWidget](https://pub.dev/documentation/stream_chat_flutter/latest/stream_chat_flutter/StreamMessageWidget-class.html) -- [StreamChatTheme](https://pub.dev/documentation/stream_chat_flutter/latest/stream_chat_flutter/StreamChatTheme-class.html) -- [StreamThreadHeader](https://pub.dev/documentation/stream_chat_flutter/latest/stream_chat_flutter/StreamThreadHeader-class.html) +- [StreamChannelHeader](https://getstream.io/chat/docs/sdk/flutter/stream_chat_flutter/stream_channel_header/) +- [StreamChannelListView](https://getstream.io/chat/docs/sdk/flutter/stream_chat_flutter/stream_channel_list_view/) +- [StreamMessageInput](https://getstream.io/chat/docs/sdk/flutter/stream_chat_flutter/stream_message_input/) +- [StreamMessageListView](https://getstream.io/chat/docs/sdk/flutter/stream_chat_flutter/stream_message_list_view/) +- [StreamMessageWidget](https://getstream.io/chat/docs/sdk/flutter/stream_chat_flutter/stream_message_widget/) +- [StreamChatTheme](https://getstream.io/chat/docs/sdk/flutter/stream_chat_flutter/stream_chat_and_theming/) - ... ### Customizing styles diff --git a/packages/stream_chat_flutter_core/CHANGELOG.md b/packages/stream_chat_flutter_core/CHANGELOG.md index 9245efd2f..5fbd7db53 100644 --- a/packages/stream_chat_flutter_core/CHANGELOG.md +++ b/packages/stream_chat_flutter_core/CHANGELOG.md @@ -1,5 +1,7 @@ ## 4.0.0 +For upgrading to V4, please refer to the [V4 Migration Guide](https://getstream.io/chat/docs/sdk/flutter/guides/migration_guide_4_0/) + - Deprecated `UsersBloc` in favor of `StreamUserListController` to control the user list. - Deprecated `MessageSearchBloc` in favor of `StreamMessageSearchListController` to control the user list. diff --git a/packages/stream_chat_flutter_core/README.md b/packages/stream_chat_flutter_core/README.md index ce0f6c951..695cd9cdf 100644 --- a/packages/stream_chat_flutter_core/README.md +++ b/packages/stream_chat_flutter_core/README.md @@ -14,6 +14,10 @@ - [Chat UI Kit](https://getstream.io/chat/ui-kit/) - [Core Docs](https://getstream.io/chat/docs/sdk/flutter/stream_chat_flutter_core/introduction/) +**V4 Migration Guide** + +For upgrading from V3 to V4, please refer to the [V4 Migration Guide](https://getstream.io/chat/docs/sdk/flutter/guides/migration_guide_4_0/) + ### Changelog Check out the [changelog on pub.dev](https://pub.dev/packages/stream_chat_flutter_core/changelog) to see the latest changes in the package. From 41f2d55f706ff85aee4842c2f99144a1c37f230d Mon Sep 17 00:00:00 2001 From: Salvatore Giordano Date: Tue, 3 May 2022 11:58:55 +0200 Subject: [PATCH 2/5] polish 4.0.0 and prepare 4.0.1 --- .../Flutter/guides/migration_guide_4_0.mdx | 6 +- .../core/models/attachment_file.freezed.dart | 59 ++++------------ .../lib/src/info_tile.dart | 10 +-- .../lib/src/message_widget.dart | 18 +++-- .../lib/src/multi_overlay.dart | 10 +-- packages/stream_chat_flutter/pubspec.yaml | 2 +- .../lib/src/db/drift_chat_database.g.dart | 70 +++++++++++-------- packages/stream_chat_persistence/pubspec.yaml | 6 +- 8 files changed, 86 insertions(+), 95 deletions(-) diff --git a/docusaurus/docs/Flutter/guides/migration_guide_4_0.mdx b/docusaurus/docs/Flutter/guides/migration_guide_4_0.mdx index 28a43ca19..887cef3ae 100644 --- a/docusaurus/docs/Flutter/guides/migration_guide_4_0.mdx +++ b/docusaurus/docs/Flutter/guides/migration_guide_4_0.mdx @@ -1,7 +1,7 @@ --- id: migration_guide_4_0 sidebar_position: 14 -title: Migration Guide For The Stream Chat Flutter SDK v4.0 +title: Migration Guide v4.0 --- **Version 4.0.0** of the Stream Chat Flutter SDK carries significant architectural changes to improve the developer experience by giving you more control and flexibility in how you use our core components and UI widgets. @@ -44,7 +44,7 @@ See the sections below on “deprecated classes” for a complete list of change This section highlights functionality removed. -## Removed methods and classes +### Removed Methods And Classes In version 4 we removed the following deprecated methods and classes: @@ -733,7 +733,7 @@ The controller makes it much simpler to dynamically modify the message input. ## Stream Chat Flutter Core -Various changes have been made to the Core package, most notably, the indroduction of all of the controllers mentioned above: +Various changes have been made to the Core package, most notably, the indroduction of all of the controllers mentioned above. These controllers replace the business logic implementations (Bloc). Please note that this is not related to the well-known Flutter Bloc package, but instead refers to the naming we used for our business logic components. diff --git a/packages/stream_chat/lib/src/core/models/attachment_file.freezed.dart b/packages/stream_chat/lib/src/core/models/attachment_file.freezed.dart index 634af64f4..f6442a53f 100644 --- a/packages/stream_chat/lib/src/core/models/attachment_file.freezed.dart +++ b/packages/stream_chat/lib/src/core/models/attachment_file.freezed.dart @@ -12,7 +12,7 @@ part of 'attachment_file.dart'; T _$identity(T value) => value; final _privateConstructorUsedError = UnsupportedError( - 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more informations: https://github.com/rrousselGit/freezed#custom-getters-and-methods'); + 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#custom-getters-and-methods'); UploadState _$UploadStateFromJson(Map json) { switch (json['runtimeType']) { @@ -31,39 +31,6 @@ UploadState _$UploadStateFromJson(Map json) { } } -/// @nodoc -class _$UploadStateTearOff { - const _$UploadStateTearOff(); - - Preparing preparing() { - return const Preparing(); - } - - InProgress inProgress({required int uploaded, required int total}) { - return InProgress( - uploaded: uploaded, - total: total, - ); - } - - Success success() { - return const Success(); - } - - Failed failed({required String error}) { - return Failed( - error: error, - ); - } - - UploadState fromJson(Map json) { - return UploadState.fromJson(json); - } -} - -/// @nodoc -const $UploadState = _$UploadStateTearOff(); - /// @nodoc mixin _$UploadState { @optionalTypeArgs @@ -154,7 +121,7 @@ class _$PreparingCopyWithImpl<$Res> extends _$UploadStateCopyWithImpl<$Res> /// @nodoc @JsonSerializable() class _$Preparing implements Preparing { - const _$Preparing({String? $type}) : $type = $type ?? 'preparing'; + const _$Preparing({final String? $type}) : $type = $type ?? 'preparing'; factory _$Preparing.fromJson(Map json) => _$$PreparingFromJson(json); @@ -173,6 +140,7 @@ class _$Preparing implements Preparing { (other.runtimeType == runtimeType && other is Preparing); } + @JsonKey(ignore: true) @override int get hashCode => runtimeType.hashCode; @@ -301,7 +269,7 @@ class _$InProgressCopyWithImpl<$Res> extends _$UploadStateCopyWithImpl<$Res> @JsonSerializable() class _$InProgress implements InProgress { const _$InProgress( - {required this.uploaded, required this.total, String? $type}) + {required this.uploaded, required this.total, final String? $type}) : $type = $type ?? 'inProgress'; factory _$InProgress.fromJson(Map json) => @@ -329,6 +297,7 @@ class _$InProgress implements InProgress { const DeepCollectionEquality().equals(other.total, total)); } + @JsonKey(ignore: true) @override int get hashCode => Object.hash( runtimeType, @@ -421,14 +390,14 @@ class _$InProgress implements InProgress { } abstract class InProgress implements UploadState { - const factory InProgress({required int uploaded, required int total}) = - _$InProgress; + const factory InProgress( + {required final int uploaded, required final int total}) = _$InProgress; factory InProgress.fromJson(Map json) = _$InProgress.fromJson; - int get uploaded; - int get total; + int get uploaded => throw _privateConstructorUsedError; + int get total => throw _privateConstructorUsedError; @JsonKey(ignore: true) $InProgressCopyWith get copyWith => throw _privateConstructorUsedError; @@ -453,7 +422,7 @@ class _$SuccessCopyWithImpl<$Res> extends _$UploadStateCopyWithImpl<$Res> /// @nodoc @JsonSerializable() class _$Success implements Success { - const _$Success({String? $type}) : $type = $type ?? 'success'; + const _$Success({final String? $type}) : $type = $type ?? 'success'; factory _$Success.fromJson(Map json) => _$$SuccessFromJson(json); @@ -472,6 +441,7 @@ class _$Success implements Success { (other.runtimeType == runtimeType && other is Success); } + @JsonKey(ignore: true) @override int get hashCode => runtimeType.hashCode; @@ -593,7 +563,7 @@ class _$FailedCopyWithImpl<$Res> extends _$UploadStateCopyWithImpl<$Res> /// @nodoc @JsonSerializable() class _$Failed implements Failed { - const _$Failed({required this.error, String? $type}) + const _$Failed({required this.error, final String? $type}) : $type = $type ?? 'failed'; factory _$Failed.fromJson(Map json) => @@ -618,6 +588,7 @@ class _$Failed implements Failed { const DeepCollectionEquality().equals(other.error, error)); } + @JsonKey(ignore: true) @override int get hashCode => Object.hash(runtimeType, const DeepCollectionEquality().hash(error)); @@ -708,11 +679,11 @@ class _$Failed implements Failed { } abstract class Failed implements UploadState { - const factory Failed({required String error}) = _$Failed; + const factory Failed({required final String error}) = _$Failed; factory Failed.fromJson(Map json) = _$Failed.fromJson; - String get error; + String get error => throw _privateConstructorUsedError; @JsonKey(ignore: true) $FailedCopyWith get copyWith => throw _privateConstructorUsedError; } diff --git a/packages/stream_chat_flutter/lib/src/info_tile.dart b/packages/stream_chat_flutter/lib/src/info_tile.dart index 86964bf01..fee76d5cb 100644 --- a/packages/stream_chat_flutter/lib/src/info_tile.dart +++ b/packages/stream_chat_flutter/lib/src/info_tile.dart @@ -46,11 +46,13 @@ class StreamInfoTile extends StatelessWidget { @override Widget build(BuildContext context) { final chatThemeData = StreamChatTheme.of(context); - return PortalEntry( + return PortalTarget( visible: showMessage, - portalAnchor: tileAnchor ?? Alignment.topCenter, - childAnchor: childAnchor ?? Alignment.bottomCenter, - portal: Container( + anchor: Aligned( + follower: tileAnchor ?? Alignment.topCenter, + target: childAnchor ?? Alignment.bottomCenter, + ), + portalFollower: Container( height: 25, color: backgroundColor ?? chatThemeData.colorTheme.textLowEmphasis.withOpacity(0.9), diff --git a/packages/stream_chat_flutter/lib/src/message_widget.dart b/packages/stream_chat_flutter/lib/src/message_widget.dart index beabe77f9..caf2722e2 100644 --- a/packages/stream_chat_flutter/lib/src/message_widget.dart +++ b/packages/stream_chat_flutter/lib/src/message_widget.dart @@ -659,9 +659,9 @@ class _StreamMessageWidgetState extends State if (widget.showUserAvatar == DisplayWidget.hide) SizedBox(width: avatarWidth + 4), Flexible( - child: PortalEntry( + child: PortalTarget( visible: showReactions, - portal: showReactions + portalFollower: showReactions ? Container( transform: Matrix4.translationValues( @@ -677,10 +677,16 @@ class _StreamMessageWidgetState extends State ), ) : null, - portalAnchor: - Alignment(widget.reverse ? 1 : -1, -1), - childAnchor: - Alignment(widget.reverse ? -1 : 1, -1), + anchor: Aligned( + follower: Alignment( + widget.reverse ? 1 : -1, + -1, + ), + target: Alignment( + widget.reverse ? -1 : 1, + -1, + ), + ), child: Stack( clipBehavior: Clip.none, children: [ diff --git a/packages/stream_chat_flutter/lib/src/multi_overlay.dart b/packages/stream_chat_flutter/lib/src/multi_overlay.dart index bd1ed3878..71ed18d26 100644 --- a/packages/stream_chat_flutter/lib/src/multi_overlay.dart +++ b/packages/stream_chat_flutter/lib/src/multi_overlay.dart @@ -41,11 +41,13 @@ class StreamMultiOverlay extends StatelessWidget { final visibleOverlay = overlayOptions.firstWhereOrNull((element) => element.visible); - return PortalEntry( - childAnchor: childAnchor, - portalAnchor: overlayAnchor, + return PortalTarget( + anchor: Aligned( + follower: overlayAnchor ?? Alignment.center, + target: childAnchor ?? Alignment.center, + ), visible: visibleOverlay != null, - portal: visibleOverlay?.widget, + portalFollower: visibleOverlay?.widget, child: child, ); } diff --git a/packages/stream_chat_flutter/pubspec.yaml b/packages/stream_chat_flutter/pubspec.yaml index ac7a6c699..f01991c25 100644 --- a/packages/stream_chat_flutter/pubspec.yaml +++ b/packages/stream_chat_flutter/pubspec.yaml @@ -21,7 +21,7 @@ dependencies: flutter: sdk: flutter flutter_markdown: ^0.6.1 - flutter_portal: ^0.4.0 + flutter_portal: ^1.0.0 flutter_slidable: ^1.2.0 flutter_svg: ^1.0.1 http_parser: ^4.0.0 diff --git a/packages/stream_chat_persistence/lib/src/db/drift_chat_database.g.dart b/packages/stream_chat_persistence/lib/src/db/drift_chat_database.g.dart index d0565973c..e5382861f 100644 --- a/packages/stream_chat_persistence/lib/src/db/drift_chat_database.g.dart +++ b/packages/stream_chat_persistence/lib/src/db/drift_chat_database.g.dart @@ -390,9 +390,10 @@ class ChannelsCompanion extends UpdateCompanion { class $ChannelsTable extends Channels with TableInfo<$ChannelsTable, ChannelEntity> { - final GeneratedDatabase _db; + @override + final GeneratedDatabase attachedDatabase; final String? _alias; - $ChannelsTable(this._db, [this._alias]); + $ChannelsTable(this.attachedDatabase, [this._alias]); final VerificationMeta _idMeta = const VerificationMeta('id'); @override late final GeneratedColumn id = GeneratedColumn( @@ -557,7 +558,7 @@ class $ChannelsTable extends Channels @override $ChannelsTable createAlias(String alias) { - return $ChannelsTable(_db, alias); + return $ChannelsTable(attachedDatabase, alias); } static TypeConverter, String> $converter0 = @@ -1337,9 +1338,10 @@ class MessagesCompanion extends UpdateCompanion { class $MessagesTable extends Messages with TableInfo<$MessagesTable, MessageEntity> { - final GeneratedDatabase _db; + @override + final GeneratedDatabase attachedDatabase; final String? _alias; - $MessagesTable(this._db, [this._alias]); + $MessagesTable(this.attachedDatabase, [this._alias]); final VerificationMeta _idMeta = const VerificationMeta('id'); @override late final GeneratedColumn id = GeneratedColumn( @@ -1647,7 +1649,7 @@ class $MessagesTable extends Messages @override $MessagesTable createAlias(String alias) { - return $MessagesTable(_db, alias); + return $MessagesTable(attachedDatabase, alias); } static TypeConverter, String> $converter0 = @@ -2442,9 +2444,10 @@ class PinnedMessagesCompanion extends UpdateCompanion { class $PinnedMessagesTable extends PinnedMessages with TableInfo<$PinnedMessagesTable, PinnedMessageEntity> { - final GeneratedDatabase _db; + @override + final GeneratedDatabase attachedDatabase; final String? _alias; - $PinnedMessagesTable(this._db, [this._alias]); + $PinnedMessagesTable(this.attachedDatabase, [this._alias]); final VerificationMeta _idMeta = const VerificationMeta('id'); @override late final GeneratedColumn id = GeneratedColumn( @@ -2755,7 +2758,7 @@ class $PinnedMessagesTable extends PinnedMessages @override $PinnedMessagesTable createAlias(String alias) { - return $PinnedMessagesTable(_db, alias); + return $PinnedMessagesTable(attachedDatabase, alias); } static TypeConverter, String> $converter0 = @@ -3005,9 +3008,10 @@ class PinnedMessageReactionsCompanion class $PinnedMessageReactionsTable extends PinnedMessageReactions with TableInfo<$PinnedMessageReactionsTable, PinnedMessageReactionEntity> { - final GeneratedDatabase _db; + @override + final GeneratedDatabase attachedDatabase; final String? _alias; - $PinnedMessageReactionsTable(this._db, [this._alias]); + $PinnedMessageReactionsTable(this.attachedDatabase, [this._alias]); final VerificationMeta _userIdMeta = const VerificationMeta('userId'); @override late final GeneratedColumn userId = GeneratedColumn( @@ -3100,7 +3104,7 @@ class $PinnedMessageReactionsTable extends PinnedMessageReactions @override $PinnedMessageReactionsTable createAlias(String alias) { - return $PinnedMessageReactionsTable(_db, alias); + return $PinnedMessageReactionsTable(attachedDatabase, alias); } static TypeConverter, String> $converter0 = @@ -3334,9 +3338,10 @@ class ReactionsCompanion extends UpdateCompanion { class $ReactionsTable extends Reactions with TableInfo<$ReactionsTable, ReactionEntity> { - final GeneratedDatabase _db; + @override + final GeneratedDatabase attachedDatabase; final String? _alias; - $ReactionsTable(this._db, [this._alias]); + $ReactionsTable(this.attachedDatabase, [this._alias]); final VerificationMeta _userIdMeta = const VerificationMeta('userId'); @override late final GeneratedColumn userId = GeneratedColumn( @@ -3426,7 +3431,7 @@ class $ReactionsTable extends Reactions @override $ReactionsTable createAlias(String alias) { - return $ReactionsTable(_db, alias); + return $ReactionsTable(attachedDatabase, alias); } static TypeConverter, String> $converter0 = @@ -3736,9 +3741,10 @@ class UsersCompanion extends UpdateCompanion { } class $UsersTable extends Users with TableInfo<$UsersTable, UserEntity> { - final GeneratedDatabase _db; + @override + final GeneratedDatabase attachedDatabase; final String? _alias; - $UsersTable(this._db, [this._alias]); + $UsersTable(this.attachedDatabase, [this._alias]); final VerificationMeta _idMeta = const VerificationMeta('id'); @override late final GeneratedColumn id = GeneratedColumn( @@ -3865,7 +3871,7 @@ class $UsersTable extends Users with TableInfo<$UsersTable, UserEntity> { @override $UsersTable createAlias(String alias) { - return $UsersTable(_db, alias); + return $UsersTable(attachedDatabase, alias); } static TypeConverter, String> $converter0 = @@ -4235,9 +4241,10 @@ class MembersCompanion extends UpdateCompanion { class $MembersTable extends Members with TableInfo<$MembersTable, MemberEntity> { - final GeneratedDatabase _db; + @override + final GeneratedDatabase attachedDatabase; final String? _alias; - $MembersTable(this._db, [this._alias]); + $MembersTable(this.attachedDatabase, [this._alias]); final VerificationMeta _userIdMeta = const VerificationMeta('userId'); @override late final GeneratedColumn userId = GeneratedColumn( @@ -4409,7 +4416,7 @@ class $MembersTable extends Members @override $MembersTable createAlias(String alias) { - return $MembersTable(_db, alias); + return $MembersTable(attachedDatabase, alias); } } @@ -4585,9 +4592,10 @@ class ReadsCompanion extends UpdateCompanion { } class $ReadsTable extends Reads with TableInfo<$ReadsTable, ReadEntity> { - final GeneratedDatabase _db; + @override + final GeneratedDatabase attachedDatabase; final String? _alias; - $ReadsTable(this._db, [this._alias]); + $ReadsTable(this.attachedDatabase, [this._alias]); final VerificationMeta _lastReadMeta = const VerificationMeta('lastRead'); @override late final GeneratedColumn lastRead = GeneratedColumn( @@ -4664,7 +4672,7 @@ class $ReadsTable extends Reads with TableInfo<$ReadsTable, ReadEntity> { @override $ReadsTable createAlias(String alias) { - return $ReadsTable(_db, alias); + return $ReadsTable(attachedDatabase, alias); } } @@ -4789,9 +4797,10 @@ class ChannelQueriesCompanion extends UpdateCompanion { class $ChannelQueriesTable extends ChannelQueries with TableInfo<$ChannelQueriesTable, ChannelQueryEntity> { - final GeneratedDatabase _db; + @override + final GeneratedDatabase attachedDatabase; final String? _alias; - $ChannelQueriesTable(this._db, [this._alias]); + $ChannelQueriesTable(this.attachedDatabase, [this._alias]); final VerificationMeta _queryHashMeta = const VerificationMeta('queryHash'); @override late final GeneratedColumn queryHash = GeneratedColumn( @@ -4840,7 +4849,7 @@ class $ChannelQueriesTable extends ChannelQueries @override $ChannelQueriesTable createAlias(String alias) { - return $ChannelQueriesTable(_db, alias); + return $ChannelQueriesTable(attachedDatabase, alias); } } @@ -5105,9 +5114,10 @@ class ConnectionEventsCompanion extends UpdateCompanion { class $ConnectionEventsTable extends ConnectionEvents with TableInfo<$ConnectionEventsTable, ConnectionEventEntity> { - final GeneratedDatabase _db; + @override + final GeneratedDatabase attachedDatabase; final String? _alias; - $ConnectionEventsTable(this._db, [this._alias]); + $ConnectionEventsTable(this.attachedDatabase, [this._alias]); final VerificationMeta _idMeta = const VerificationMeta('id'); @override late final GeneratedColumn id = GeneratedColumn( @@ -5215,7 +5225,7 @@ class $ConnectionEventsTable extends ConnectionEvents @override $ConnectionEventsTable createAlias(String alias) { - return $ConnectionEventsTable(_db, alias); + return $ConnectionEventsTable(attachedDatabase, alias); } static TypeConverter, String> $converter0 = diff --git a/packages/stream_chat_persistence/pubspec.yaml b/packages/stream_chat_persistence/pubspec.yaml index 05872dab7..839888ad4 100644 --- a/packages/stream_chat_persistence/pubspec.yaml +++ b/packages/stream_chat_persistence/pubspec.yaml @@ -10,7 +10,7 @@ environment: flutter: ">=1.17.0" dependencies: - drift: ">=1.3.0 < 1.4.0" + drift: ^1.5.0 flutter: sdk: flutter logging: ^1.0.1 @@ -24,8 +24,8 @@ dependencies: dev_dependencies: build_runner: ^2.0.1 dart_code_metrics: ^4.4.0 - drift_dev: ">=1.3.0 < 1.4.0" + drift_dev: ^1.5.2 flutter_test: sdk: flutter - mocktail: ^0.2.0 + mocktail: ^0.3.0 \ No newline at end of file From 5ce540ad4acc6c3a73c9050d77591e70b883286f Mon Sep 17 00:00:00 2001 From: Salvatore Giordano Date: Tue, 3 May 2022 12:05:09 +0200 Subject: [PATCH 3/5] chore(llc,core,ui, persistence): update pubspec and changelogs --- packages/stream_chat/CHANGELOG.md | 4 ++++ packages/stream_chat/lib/version.dart | 2 +- packages/stream_chat/pubspec.yaml | 2 +- packages/stream_chat_flutter/CHANGELOG.md | 5 +++++ packages/stream_chat_flutter/pubspec.yaml | 4 ++-- packages/stream_chat_flutter_core/CHANGELOG.md | 5 +++++ packages/stream_chat_flutter_core/pubspec.yaml | 4 ++-- packages/stream_chat_persistence/CHANGELOG.md | 4 ++++ packages/stream_chat_persistence/pubspec.yaml | 4 ++-- 9 files changed, 26 insertions(+), 8 deletions(-) diff --git a/packages/stream_chat/CHANGELOG.md b/packages/stream_chat/CHANGELOG.md index 131427115..3edd8c885 100644 --- a/packages/stream_chat/CHANGELOG.md +++ b/packages/stream_chat/CHANGELOG.md @@ -1,3 +1,7 @@ +## 4.0.1 + +- Minor fixes + ## 4.0.0 For upgrading to V4, please refer to the [V4 Migration Guide](https://getstream.io/chat/docs/sdk/flutter/guides/migration_guide_4_0/) diff --git a/packages/stream_chat/lib/version.dart b/packages/stream_chat/lib/version.dart index 46bec2d5c..5ea92b4d8 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 = '4.0.0'; +const PACKAGE_VERSION = '4.0.1'; diff --git a/packages/stream_chat/pubspec.yaml b/packages/stream_chat/pubspec.yaml index 8ed38305c..acce67b70 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: 4.0.0 +version: 4.0.1 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 3b4efb4ab..7d171f925 100644 --- a/packages/stream_chat_flutter/CHANGELOG.md +++ b/packages/stream_chat_flutter/CHANGELOG.md @@ -1,3 +1,8 @@ +## 4.0.1 + +- Minor fixes +- Updated `stream_chat_flutter_core` dependency to [`4.0.1`](https://pub.dev/packages/stream_chat_flutter_core/changelog). + ## 4.0.0 For upgrading to V4, please refer to the [V4 Migration Guide](https://getstream.io/chat/docs/sdk/flutter/guides/migration_guide_4_0/) diff --git a/packages/stream_chat_flutter/pubspec.yaml b/packages/stream_chat_flutter/pubspec.yaml index f01991c25..5bdd16544 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 +version: 4.0.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: ^4.0.0 + stream_chat_flutter_core: ^4.0.1 substring_highlight: ^1.0.26 url_launcher: ^6.0.3 video_player: ^2.1.0 diff --git a/packages/stream_chat_flutter_core/CHANGELOG.md b/packages/stream_chat_flutter_core/CHANGELOG.md index 5fbd7db53..9927e7341 100644 --- a/packages/stream_chat_flutter_core/CHANGELOG.md +++ b/packages/stream_chat_flutter_core/CHANGELOG.md @@ -1,3 +1,8 @@ +## 4.0.1 + +- Minor fixes +- Updated `stream_chat` dependency to [`4.0.1`](https://pub.dev/packages/stream_chat/changelog). + ## 4.0.0 For upgrading to V4, please refer to the [V4 Migration Guide](https://getstream.io/chat/docs/sdk/flutter/guides/migration_guide_4_0/) diff --git a/packages/stream_chat_flutter_core/pubspec.yaml b/packages/stream_chat_flutter_core/pubspec.yaml index dd4ad795c..d7b1cfc27 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: 4.0.0 +version: 4.0.1 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: ^4.0.0 + stream_chat: ^4.0.1 dev_dependencies: build_runner: ^2.0.1 diff --git a/packages/stream_chat_persistence/CHANGELOG.md b/packages/stream_chat_persistence/CHANGELOG.md index 6f3482ece..6dd74f8ba 100644 --- a/packages/stream_chat_persistence/CHANGELOG.md +++ b/packages/stream_chat_persistence/CHANGELOG.md @@ -1,3 +1,7 @@ +## 4.0.1 + +- Updated `stream_chat` dependency to [`4.0.1`](https://pub.dev/packages/stream_chat/changelog). + ## 4.0.0 - Updated `stream_chat` dependency to [`4.0.0`](https://pub.dev/packages/stream_chat/changelog). diff --git a/packages/stream_chat_persistence/pubspec.yaml b/packages/stream_chat_persistence/pubspec.yaml index 839888ad4..de73c91cd 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: 4.0.0 +version: 4.0.1 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: ^4.0.0 + stream_chat: ^4.0.1 dev_dependencies: build_runner: ^2.0.1 From 7f562d3ee8e3beab08d700fcd6aa8851b14e6c5c Mon Sep 17 00:00:00 2001 From: Salvatore Giordano Date: Tue, 3 May 2022 12:58:47 +0200 Subject: [PATCH 4/5] update melos --- .github/workflows/dart_code_metrics.yaml | 4 ++-- .github/workflows/stream_flutter_workflow.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/dart_code_metrics.yaml b/.github/workflows/dart_code_metrics.yaml index 63ec9484e..12c3a3d4d 100644 --- a/.github/workflows/dart_code_metrics.yaml +++ b/.github/workflows/dart_code_metrics.yaml @@ -1,9 +1,9 @@ name: Dart Code Metrics env: - flutter_version: "2.8.1" + flutter_version: "2.10.5" folders: "lib, test" - melos_version: "1.2.0" + melos_version: "2.1.0" on: pull_request: diff --git a/.github/workflows/stream_flutter_workflow.yml b/.github/workflows/stream_flutter_workflow.yml index 5f92c714d..1b2263ce6 100644 --- a/.github/workflows/stream_flutter_workflow.yml +++ b/.github/workflows/stream_flutter_workflow.yml @@ -2,8 +2,8 @@ name: stream_flutter_workflow env: ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true' - flutter_version: "2.8.1" - melos_version: "1.2.0" + flutter_version: "2.10.5" + melos_version: "2.1.0" on: pull_request: From 075f9414de286114a4fd89c2e36b31ad41486f34 Mon Sep 17 00:00:00 2001 From: Salvatore Giordano Date: Tue, 3 May 2022 15:44:03 +0200 Subject: [PATCH 5/5] fix localization tests --- packages/stream_chat_flutter/pubspec.yaml | 2 +- packages/stream_chat_localizations/test/basics_test.dart | 8 ++++---- .../stream_chat_localizations/test/override_test.dart | 7 ++++--- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/packages/stream_chat_flutter/pubspec.yaml b/packages/stream_chat_flutter/pubspec.yaml index 5bdd16544..69e7c42c0 100644 --- a/packages/stream_chat_flutter/pubspec.yaml +++ b/packages/stream_chat_flutter/pubspec.yaml @@ -38,7 +38,7 @@ dependencies: shimmer: ^2.0.0 stream_chat_flutter_core: ^4.0.1 substring_highlight: ^1.0.26 - url_launcher: ^6.0.3 + url_launcher: ^6.1.0 video_player: ^2.1.0 video_thumbnail: ^0.5.0 diff --git a/packages/stream_chat_localizations/test/basics_test.dart b/packages/stream_chat_localizations/test/basics_test.dart index c1315a9a8..8491a3321 100644 --- a/packages/stream_chat_localizations/test/basics_test.dart +++ b/packages/stream_chat_localizations/test/basics_test.dart @@ -2,7 +2,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; -import 'package:stream_chat_localizations/src/stream_chat_localizations.dart'; +import 'package:stream_chat_localizations/stream_chat_localizations.dart'; void main() { testWidgets('Nested Localizations', (WidgetTester tester) async { @@ -41,6 +41,8 @@ void main() { localizationsDelegates: const [ DummyLocalizations.delegate, GlobalStreamChatLocalizations.delegate, + GlobalMaterialLocalizations.delegate, + GlobalCupertinoLocalizations.delegate, ], home: PageView(), )); @@ -54,9 +56,7 @@ void main() { testWidgets('Locale without countryCode', (WidgetTester tester) async { // Regression test for https://github.com/flutter/flutter/pull/16782 await tester.pumpWidget(MaterialApp( - localizationsDelegates: const >[ - GlobalStreamChatLocalizations.delegate, - ], + localizationsDelegates: GlobalStreamChatLocalizations.delegates, supportedLocales: const [ Locale('en', 'US'), Locale('hi'), diff --git a/packages/stream_chat_localizations/test/override_test.dart b/packages/stream_chat_localizations/test/override_test.dart index 513dd3364..a30bb09af 100644 --- a/packages/stream_chat_localizations/test/override_test.dart +++ b/packages/stream_chat_localizations/test/override_test.dart @@ -166,8 +166,8 @@ void main() { final Key textKey = UniqueKey(); await tester.pumpWidget(buildFrame( - delegates: >[ - GlobalStreamChatLocalizations.delegate, + delegates: [ + ...GlobalStreamChatLocalizations.delegates, const FooStreamChatLocalizationsDelegate( supportedLanguage: 'fr', launchUrlError: "Impossible de lancer l'url", @@ -217,10 +217,11 @@ void main() { // Accept whatever locale we're given localeResolutionCallback: (Locale? locale, Iterable supportedLocales) => locale, - delegates: [ + delegates: [ const FooStreamChatLocalizationsDelegate( supportedLanguage: 'allLanguages', ), + ...GlobalStreamChatLocalizations.delegates, ], buildContent: (BuildContext context) { // Should always be 'foo', no matter what the locale is