Merge branch 'develop'

This commit is contained in:
Salvatore Giordano
2022-05-03 16:40:11 +02:00
22 changed files with 150 additions and 125 deletions
+2 -2
View File
@@ -1,9 +1,9 @@
name: Dart Code Metrics name: Dart Code Metrics
env: env:
flutter_version: "2.8.1" flutter_version: "2.10.5"
folders: "lib, test" folders: "lib, test"
melos_version: "1.2.0" melos_version: "2.1.0"
on: on:
pull_request: pull_request:
@@ -2,8 +2,8 @@ name: stream_flutter_workflow
env: env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true' ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
flutter_version: "2.8.1" flutter_version: "2.10.5"
melos_version: "1.2.0" melos_version: "2.1.0"
on: on:
pull_request: pull_request:
@@ -1,7 +1,7 @@
--- ---
id: migration_guide_4_0 id: migration_guide_4_0
sidebar_position: 14 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. **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. This section highlights functionality removed.
## Removed methods and classes ### Removed Methods And Classes
In version 4 we removed the following deprecated 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 ## 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. 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.
+6
View File
@@ -1,5 +1,11 @@
## 4.0.1
- Minor fixes
## 4.0.0 ## 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
- Added `push_provider_name` to `addDevice` API call - Added `push_provider_name` to `addDevice` API call
+4
View File
@@ -13,6 +13,10 @@
- [Chat UI Kit](https://getstream.io/chat/ui-kit/) - [Chat UI Kit](https://getstream.io/chat/ui-kit/)
- [Chat Client Docs](https://getstream.io/chat/docs/flutter-dart/?language=dart) - [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 ### Changelog
Check out the [changelog on pub.dev](https://pub.dev/packages/stream_chat/changelog) to see the latest changes in the package. Check out the [changelog on pub.dev](https://pub.dev/packages/stream_chat/changelog) to see the latest changes in the package.
@@ -12,7 +12,7 @@ part of 'attachment_file.dart';
T _$identity<T>(T value) => value; T _$identity<T>(T value) => value;
final _privateConstructorUsedError = UnsupportedError( 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<String, dynamic> json) { UploadState _$UploadStateFromJson(Map<String, dynamic> json) {
switch (json['runtimeType']) { switch (json['runtimeType']) {
@@ -31,39 +31,6 @@ UploadState _$UploadStateFromJson(Map<String, dynamic> 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<String, Object?> json) {
return UploadState.fromJson(json);
}
}
/// @nodoc
const $UploadState = _$UploadStateTearOff();
/// @nodoc /// @nodoc
mixin _$UploadState { mixin _$UploadState {
@optionalTypeArgs @optionalTypeArgs
@@ -154,7 +121,7 @@ class _$PreparingCopyWithImpl<$Res> extends _$UploadStateCopyWithImpl<$Res>
/// @nodoc /// @nodoc
@JsonSerializable() @JsonSerializable()
class _$Preparing implements Preparing { class _$Preparing implements Preparing {
const _$Preparing({String? $type}) : $type = $type ?? 'preparing'; const _$Preparing({final String? $type}) : $type = $type ?? 'preparing';
factory _$Preparing.fromJson(Map<String, dynamic> json) => factory _$Preparing.fromJson(Map<String, dynamic> json) =>
_$$PreparingFromJson(json); _$$PreparingFromJson(json);
@@ -173,6 +140,7 @@ class _$Preparing implements Preparing {
(other.runtimeType == runtimeType && other is Preparing); (other.runtimeType == runtimeType && other is Preparing);
} }
@JsonKey(ignore: true)
@override @override
int get hashCode => runtimeType.hashCode; int get hashCode => runtimeType.hashCode;
@@ -301,7 +269,7 @@ class _$InProgressCopyWithImpl<$Res> extends _$UploadStateCopyWithImpl<$Res>
@JsonSerializable() @JsonSerializable()
class _$InProgress implements InProgress { class _$InProgress implements InProgress {
const _$InProgress( const _$InProgress(
{required this.uploaded, required this.total, String? $type}) {required this.uploaded, required this.total, final String? $type})
: $type = $type ?? 'inProgress'; : $type = $type ?? 'inProgress';
factory _$InProgress.fromJson(Map<String, dynamic> json) => factory _$InProgress.fromJson(Map<String, dynamic> json) =>
@@ -329,6 +297,7 @@ class _$InProgress implements InProgress {
const DeepCollectionEquality().equals(other.total, total)); const DeepCollectionEquality().equals(other.total, total));
} }
@JsonKey(ignore: true)
@override @override
int get hashCode => Object.hash( int get hashCode => Object.hash(
runtimeType, runtimeType,
@@ -421,14 +390,14 @@ class _$InProgress implements InProgress {
} }
abstract class InProgress implements UploadState { abstract class InProgress implements UploadState {
const factory InProgress({required int uploaded, required int total}) = const factory InProgress(
_$InProgress; {required final int uploaded, required final int total}) = _$InProgress;
factory InProgress.fromJson(Map<String, dynamic> json) = factory InProgress.fromJson(Map<String, dynamic> json) =
_$InProgress.fromJson; _$InProgress.fromJson;
int get uploaded; int get uploaded => throw _privateConstructorUsedError;
int get total; int get total => throw _privateConstructorUsedError;
@JsonKey(ignore: true) @JsonKey(ignore: true)
$InProgressCopyWith<InProgress> get copyWith => $InProgressCopyWith<InProgress> get copyWith =>
throw _privateConstructorUsedError; throw _privateConstructorUsedError;
@@ -453,7 +422,7 @@ class _$SuccessCopyWithImpl<$Res> extends _$UploadStateCopyWithImpl<$Res>
/// @nodoc /// @nodoc
@JsonSerializable() @JsonSerializable()
class _$Success implements Success { class _$Success implements Success {
const _$Success({String? $type}) : $type = $type ?? 'success'; const _$Success({final String? $type}) : $type = $type ?? 'success';
factory _$Success.fromJson(Map<String, dynamic> json) => factory _$Success.fromJson(Map<String, dynamic> json) =>
_$$SuccessFromJson(json); _$$SuccessFromJson(json);
@@ -472,6 +441,7 @@ class _$Success implements Success {
(other.runtimeType == runtimeType && other is Success); (other.runtimeType == runtimeType && other is Success);
} }
@JsonKey(ignore: true)
@override @override
int get hashCode => runtimeType.hashCode; int get hashCode => runtimeType.hashCode;
@@ -593,7 +563,7 @@ class _$FailedCopyWithImpl<$Res> extends _$UploadStateCopyWithImpl<$Res>
/// @nodoc /// @nodoc
@JsonSerializable() @JsonSerializable()
class _$Failed implements Failed { class _$Failed implements Failed {
const _$Failed({required this.error, String? $type}) const _$Failed({required this.error, final String? $type})
: $type = $type ?? 'failed'; : $type = $type ?? 'failed';
factory _$Failed.fromJson(Map<String, dynamic> json) => factory _$Failed.fromJson(Map<String, dynamic> json) =>
@@ -618,6 +588,7 @@ class _$Failed implements Failed {
const DeepCollectionEquality().equals(other.error, error)); const DeepCollectionEquality().equals(other.error, error));
} }
@JsonKey(ignore: true)
@override @override
int get hashCode => int get hashCode =>
Object.hash(runtimeType, const DeepCollectionEquality().hash(error)); Object.hash(runtimeType, const DeepCollectionEquality().hash(error));
@@ -708,11 +679,11 @@ class _$Failed implements Failed {
} }
abstract class Failed implements UploadState { abstract class Failed implements UploadState {
const factory Failed({required String error}) = _$Failed; const factory Failed({required final String error}) = _$Failed;
factory Failed.fromJson(Map<String, dynamic> json) = _$Failed.fromJson; factory Failed.fromJson(Map<String, dynamic> json) = _$Failed.fromJson;
String get error; String get error => throw _privateConstructorUsedError;
@JsonKey(ignore: true) @JsonKey(ignore: true)
$FailedCopyWith<Failed> get copyWith => throw _privateConstructorUsedError; $FailedCopyWith<Failed> get copyWith => throw _privateConstructorUsedError;
} }
+1 -1
View File
@@ -3,4 +3,4 @@ import 'package:stream_chat/src/client/client.dart';
/// Current package version /// Current package version
/// Used in [StreamChatClient] to build the `x-stream-client` header /// Used in [StreamChatClient] to build the `x-stream-client` header
// ignore: constant_identifier_names // ignore: constant_identifier_names
const PACKAGE_VERSION = '4.0.0'; const PACKAGE_VERSION = '4.0.1';
+1 -1
View File
@@ -1,7 +1,7 @@
name: stream_chat name: stream_chat
homepage: https://getstream.io/ homepage: https://getstream.io/
description: The official Dart client for Stream Chat, a service for building chat applications. 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 repository: https://github.com/GetStream/stream-chat-flutter
issue_tracker: https://github.com/GetStream/stream-chat-flutter/issues issue_tracker: https://github.com/GetStream/stream-chat-flutter/issues
@@ -1,5 +1,12 @@
## 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 ## 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
- [[#1087]](https://github.com/GetStream/stream-chat-flutter/issues/1087): Handle limited access to camera on iOS. - [[#1087]](https://github.com/GetStream/stream-chat-flutter/issues/1087): Handle limited access to camera on iOS.
@@ -11,6 +18,7 @@
- [[#842]](https://github.com/GetStream/stream-chat-flutter/issues/842): show date divider for first message. - [[#842]](https://github.com/GetStream/stream-chat-flutter/issues/842): show date divider for first message.
- Loosen up url check for attachment download. - Loosen up url check for attachment download.
- Use `ogScrapeUrl` for LinkAttachments. - Use `ogScrapeUrl` for LinkAttachments.
## 4.0.0-beta.2 ## 4.0.0-beta.2
✅ Added ✅ Added
+10 -10
View File
@@ -17,6 +17,10 @@
- [UI Docs](https://getstream.io/chat/docs/sdk/flutter/stream_chat_flutter/introduction/) - [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) - [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 ### Changelog
Check out the [changelog on pub.dev](https://pub.dev/packages/stream_chat_flutter/changelog) to see the latest changes in the package. 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. 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. 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) - [StreamChannelHeader](https://getstream.io/chat/docs/sdk/flutter/stream_chat_flutter/stream_channel_header/)
- [StreamChannelAvatar](https://pub.dev/documentation/stream_chat_flutter/latest/stream_chat_flutter/StreamChannelAvatar-class.html) - [StreamChannelListView](https://getstream.io/chat/docs/sdk/flutter/stream_chat_flutter/stream_channel_list_view/)
- [StreamChannelListView](https://pub.dev/documentation/stream_chat_flutter/latest/stream_chat_flutter/StreamChannelListView-class.html) - [StreamMessageInput](https://getstream.io/chat/docs/sdk/flutter/stream_chat_flutter/stream_message_input/)
- [StreamChannelName](https://pub.dev/documentation/stream_chat_flutter/latest/stream_chat_flutter/StreamChannelName-class.html) - [StreamMessageListView](https://getstream.io/chat/docs/sdk/flutter/stream_chat_flutter/stream_message_list_view/)
- [StreamChannelListTile](https://pub.dev/documentation/stream_chat_flutter/latest/stream_chat_flutter/StreamChannelListTile-class.html) - [StreamMessageWidget](https://getstream.io/chat/docs/sdk/flutter/stream_chat_flutter/stream_message_widget/)
- [StreamMessageInput](https://pub.dev/documentation/stream_chat_flutter/latest/stream_chat_flutter/StreamMessageInput-class.html) - [StreamChatTheme](https://getstream.io/chat/docs/sdk/flutter/stream_chat_flutter/stream_chat_and_theming/)
- [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)
- ... - ...
### Customizing styles ### Customizing styles
@@ -46,11 +46,13 @@ class StreamInfoTile extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
final chatThemeData = StreamChatTheme.of(context); final chatThemeData = StreamChatTheme.of(context);
return PortalEntry( return PortalTarget(
visible: showMessage, visible: showMessage,
portalAnchor: tileAnchor ?? Alignment.topCenter, anchor: Aligned(
childAnchor: childAnchor ?? Alignment.bottomCenter, follower: tileAnchor ?? Alignment.topCenter,
portal: Container( target: childAnchor ?? Alignment.bottomCenter,
),
portalFollower: Container(
height: 25, height: 25,
color: backgroundColor ?? color: backgroundColor ??
chatThemeData.colorTheme.textLowEmphasis.withOpacity(0.9), chatThemeData.colorTheme.textLowEmphasis.withOpacity(0.9),
@@ -659,9 +659,9 @@ class _StreamMessageWidgetState extends State<StreamMessageWidget>
if (widget.showUserAvatar == DisplayWidget.hide) if (widget.showUserAvatar == DisplayWidget.hide)
SizedBox(width: avatarWidth + 4), SizedBox(width: avatarWidth + 4),
Flexible( Flexible(
child: PortalEntry( child: PortalTarget(
visible: showReactions, visible: showReactions,
portal: showReactions portalFollower: showReactions
? Container( ? Container(
transform: transform:
Matrix4.translationValues( Matrix4.translationValues(
@@ -677,10 +677,16 @@ class _StreamMessageWidgetState extends State<StreamMessageWidget>
), ),
) )
: null, : null,
portalAnchor: anchor: Aligned(
Alignment(widget.reverse ? 1 : -1, -1), follower: Alignment(
childAnchor: widget.reverse ? 1 : -1,
Alignment(widget.reverse ? -1 : 1, -1), -1,
),
target: Alignment(
widget.reverse ? -1 : 1,
-1,
),
),
child: Stack( child: Stack(
clipBehavior: Clip.none, clipBehavior: Clip.none,
children: [ children: [
@@ -41,11 +41,13 @@ class StreamMultiOverlay extends StatelessWidget {
final visibleOverlay = final visibleOverlay =
overlayOptions.firstWhereOrNull((element) => element.visible); overlayOptions.firstWhereOrNull((element) => element.visible);
return PortalEntry( return PortalTarget(
childAnchor: childAnchor, anchor: Aligned(
portalAnchor: overlayAnchor, follower: overlayAnchor ?? Alignment.center,
target: childAnchor ?? Alignment.center,
),
visible: visibleOverlay != null, visible: visibleOverlay != null,
portal: visibleOverlay?.widget, portalFollower: visibleOverlay?.widget,
child: child, child: child,
); );
} }
+4 -4
View File
@@ -1,7 +1,7 @@
name: stream_chat_flutter name: stream_chat_flutter
homepage: https://github.com/GetStream/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. 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 repository: https://github.com/GetStream/stream-chat-flutter
issue_tracker: https://github.com/GetStream/stream-chat-flutter/issues issue_tracker: https://github.com/GetStream/stream-chat-flutter/issues
@@ -21,7 +21,7 @@ dependencies:
flutter: flutter:
sdk: flutter sdk: flutter
flutter_markdown: ^0.6.1 flutter_markdown: ^0.6.1
flutter_portal: ^0.4.0 flutter_portal: ^1.0.0
flutter_slidable: ^1.2.0 flutter_slidable: ^1.2.0
flutter_svg: ^1.0.1 flutter_svg: ^1.0.1
http_parser: ^4.0.0 http_parser: ^4.0.0
@@ -36,9 +36,9 @@ dependencies:
rxdart: ^0.27.0 rxdart: ^0.27.0
share_plus: ^4.0.1 share_plus: ^4.0.1
shimmer: ^2.0.0 shimmer: ^2.0.0
stream_chat_flutter_core: ^4.0.0 stream_chat_flutter_core: ^4.0.1
substring_highlight: ^1.0.26 substring_highlight: ^1.0.26
url_launcher: ^6.0.3 url_launcher: ^6.1.0
video_player: ^2.1.0 video_player: ^2.1.0
video_thumbnail: ^0.5.0 video_thumbnail: ^0.5.0
@@ -1,5 +1,12 @@
## 4.0.1
- Minor fixes
- Updated `stream_chat` dependency to [`4.0.1`](https://pub.dev/packages/stream_chat/changelog).
## 4.0.0 ## 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 `UsersBloc` in favor of `StreamUserListController` to control the user list.
- Deprecated `MessageSearchBloc` in favor of `StreamMessageSearchListController` to control the user list. - Deprecated `MessageSearchBloc` in favor of `StreamMessageSearchListController` to control the user list.
@@ -14,6 +14,10 @@
- [Chat UI Kit](https://getstream.io/chat/ui-kit/) - [Chat UI Kit](https://getstream.io/chat/ui-kit/)
- [Core Docs](https://getstream.io/chat/docs/sdk/flutter/stream_chat_flutter_core/introduction/) - [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 ### 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. Check out the [changelog on pub.dev](https://pub.dev/packages/stream_chat_flutter_core/changelog) to see the latest changes in the package.
@@ -1,7 +1,7 @@
name: stream_chat_flutter_core name: stream_chat_flutter_core
homepage: https://github.com/GetStream/stream-chat-flutter homepage: https://github.com/GetStream/stream-chat-flutter
description: Stream Chat official Flutter SDK Core. Build your own chat experience using Dart and 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 repository: https://github.com/GetStream/stream-chat-flutter
issue_tracker: https://github.com/GetStream/stream-chat-flutter/issues issue_tracker: https://github.com/GetStream/stream-chat-flutter/issues
@@ -17,7 +17,7 @@ dependencies:
freezed_annotation: ^1.0.0 freezed_annotation: ^1.0.0
meta: ^1.3.0 meta: ^1.3.0
rxdart: ^0.27.0 rxdart: ^0.27.0
stream_chat: ^4.0.0 stream_chat: ^4.0.1
dev_dependencies: dev_dependencies:
build_runner: ^2.0.1 build_runner: ^2.0.1
@@ -2,7 +2,7 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.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() { void main() {
testWidgets('Nested Localizations', (WidgetTester tester) async { testWidgets('Nested Localizations', (WidgetTester tester) async {
@@ -41,6 +41,8 @@ void main() {
localizationsDelegates: const [ localizationsDelegates: const [
DummyLocalizations.delegate, DummyLocalizations.delegate,
GlobalStreamChatLocalizations.delegate, GlobalStreamChatLocalizations.delegate,
GlobalMaterialLocalizations.delegate,
GlobalCupertinoLocalizations.delegate,
], ],
home: PageView(), home: PageView(),
)); ));
@@ -54,9 +56,7 @@ void main() {
testWidgets('Locale without countryCode', (WidgetTester tester) async { testWidgets('Locale without countryCode', (WidgetTester tester) async {
// Regression test for https://github.com/flutter/flutter/pull/16782 // Regression test for https://github.com/flutter/flutter/pull/16782
await tester.pumpWidget(MaterialApp( await tester.pumpWidget(MaterialApp(
localizationsDelegates: const <LocalizationsDelegate<dynamic>>[ localizationsDelegates: GlobalStreamChatLocalizations.delegates,
GlobalStreamChatLocalizations.delegate,
],
supportedLocales: const <Locale>[ supportedLocales: const <Locale>[
Locale('en', 'US'), Locale('en', 'US'),
Locale('hi'), Locale('hi'),
@@ -166,8 +166,8 @@ void main() {
final Key textKey = UniqueKey(); final Key textKey = UniqueKey();
await tester.pumpWidget(buildFrame( await tester.pumpWidget(buildFrame(
delegates: <LocalizationsDelegate<StreamChatLocalizations>>[ delegates: <LocalizationsDelegate>[
GlobalStreamChatLocalizations.delegate, ...GlobalStreamChatLocalizations.delegates,
const FooStreamChatLocalizationsDelegate( const FooStreamChatLocalizationsDelegate(
supportedLanguage: 'fr', supportedLanguage: 'fr',
launchUrlError: "Impossible de lancer l'url", launchUrlError: "Impossible de lancer l'url",
@@ -217,10 +217,11 @@ void main() {
// Accept whatever locale we're given // Accept whatever locale we're given
localeResolutionCallback: localeResolutionCallback:
(Locale? locale, Iterable<Locale> supportedLocales) => locale, (Locale? locale, Iterable<Locale> supportedLocales) => locale,
delegates: <FooStreamChatLocalizationsDelegate>[ delegates: [
const FooStreamChatLocalizationsDelegate( const FooStreamChatLocalizationsDelegate(
supportedLanguage: 'allLanguages', supportedLanguage: 'allLanguages',
), ),
...GlobalStreamChatLocalizations.delegates,
], ],
buildContent: (BuildContext context) { buildContent: (BuildContext context) {
// Should always be 'foo', no matter what the locale is // Should always be 'foo', no matter what the locale is
@@ -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 ## 4.0.0
- Updated `stream_chat` dependency to [`4.0.0`](https://pub.dev/packages/stream_chat/changelog). - Updated `stream_chat` dependency to [`4.0.0`](https://pub.dev/packages/stream_chat/changelog).
@@ -390,9 +390,10 @@ class ChannelsCompanion extends UpdateCompanion<ChannelEntity> {
class $ChannelsTable extends Channels class $ChannelsTable extends Channels
with TableInfo<$ChannelsTable, ChannelEntity> { with TableInfo<$ChannelsTable, ChannelEntity> {
final GeneratedDatabase _db; @override
final GeneratedDatabase attachedDatabase;
final String? _alias; final String? _alias;
$ChannelsTable(this._db, [this._alias]); $ChannelsTable(this.attachedDatabase, [this._alias]);
final VerificationMeta _idMeta = const VerificationMeta('id'); final VerificationMeta _idMeta = const VerificationMeta('id');
@override @override
late final GeneratedColumn<String?> id = GeneratedColumn<String?>( late final GeneratedColumn<String?> id = GeneratedColumn<String?>(
@@ -557,7 +558,7 @@ class $ChannelsTable extends Channels
@override @override
$ChannelsTable createAlias(String alias) { $ChannelsTable createAlias(String alias) {
return $ChannelsTable(_db, alias); return $ChannelsTable(attachedDatabase, alias);
} }
static TypeConverter<Map<String, dynamic>, String> $converter0 = static TypeConverter<Map<String, dynamic>, String> $converter0 =
@@ -1337,9 +1338,10 @@ class MessagesCompanion extends UpdateCompanion<MessageEntity> {
class $MessagesTable extends Messages class $MessagesTable extends Messages
with TableInfo<$MessagesTable, MessageEntity> { with TableInfo<$MessagesTable, MessageEntity> {
final GeneratedDatabase _db; @override
final GeneratedDatabase attachedDatabase;
final String? _alias; final String? _alias;
$MessagesTable(this._db, [this._alias]); $MessagesTable(this.attachedDatabase, [this._alias]);
final VerificationMeta _idMeta = const VerificationMeta('id'); final VerificationMeta _idMeta = const VerificationMeta('id');
@override @override
late final GeneratedColumn<String?> id = GeneratedColumn<String?>( late final GeneratedColumn<String?> id = GeneratedColumn<String?>(
@@ -1647,7 +1649,7 @@ class $MessagesTable extends Messages
@override @override
$MessagesTable createAlias(String alias) { $MessagesTable createAlias(String alias) {
return $MessagesTable(_db, alias); return $MessagesTable(attachedDatabase, alias);
} }
static TypeConverter<List<String>, String> $converter0 = static TypeConverter<List<String>, String> $converter0 =
@@ -2442,9 +2444,10 @@ class PinnedMessagesCompanion extends UpdateCompanion<PinnedMessageEntity> {
class $PinnedMessagesTable extends PinnedMessages class $PinnedMessagesTable extends PinnedMessages
with TableInfo<$PinnedMessagesTable, PinnedMessageEntity> { with TableInfo<$PinnedMessagesTable, PinnedMessageEntity> {
final GeneratedDatabase _db; @override
final GeneratedDatabase attachedDatabase;
final String? _alias; final String? _alias;
$PinnedMessagesTable(this._db, [this._alias]); $PinnedMessagesTable(this.attachedDatabase, [this._alias]);
final VerificationMeta _idMeta = const VerificationMeta('id'); final VerificationMeta _idMeta = const VerificationMeta('id');
@override @override
late final GeneratedColumn<String?> id = GeneratedColumn<String?>( late final GeneratedColumn<String?> id = GeneratedColumn<String?>(
@@ -2755,7 +2758,7 @@ class $PinnedMessagesTable extends PinnedMessages
@override @override
$PinnedMessagesTable createAlias(String alias) { $PinnedMessagesTable createAlias(String alias) {
return $PinnedMessagesTable(_db, alias); return $PinnedMessagesTable(attachedDatabase, alias);
} }
static TypeConverter<List<String>, String> $converter0 = static TypeConverter<List<String>, String> $converter0 =
@@ -3005,9 +3008,10 @@ class PinnedMessageReactionsCompanion
class $PinnedMessageReactionsTable extends PinnedMessageReactions class $PinnedMessageReactionsTable extends PinnedMessageReactions
with TableInfo<$PinnedMessageReactionsTable, PinnedMessageReactionEntity> { with TableInfo<$PinnedMessageReactionsTable, PinnedMessageReactionEntity> {
final GeneratedDatabase _db; @override
final GeneratedDatabase attachedDatabase;
final String? _alias; final String? _alias;
$PinnedMessageReactionsTable(this._db, [this._alias]); $PinnedMessageReactionsTable(this.attachedDatabase, [this._alias]);
final VerificationMeta _userIdMeta = const VerificationMeta('userId'); final VerificationMeta _userIdMeta = const VerificationMeta('userId');
@override @override
late final GeneratedColumn<String?> userId = GeneratedColumn<String?>( late final GeneratedColumn<String?> userId = GeneratedColumn<String?>(
@@ -3100,7 +3104,7 @@ class $PinnedMessageReactionsTable extends PinnedMessageReactions
@override @override
$PinnedMessageReactionsTable createAlias(String alias) { $PinnedMessageReactionsTable createAlias(String alias) {
return $PinnedMessageReactionsTable(_db, alias); return $PinnedMessageReactionsTable(attachedDatabase, alias);
} }
static TypeConverter<Map<String, Object?>, String> $converter0 = static TypeConverter<Map<String, Object?>, String> $converter0 =
@@ -3334,9 +3338,10 @@ class ReactionsCompanion extends UpdateCompanion<ReactionEntity> {
class $ReactionsTable extends Reactions class $ReactionsTable extends Reactions
with TableInfo<$ReactionsTable, ReactionEntity> { with TableInfo<$ReactionsTable, ReactionEntity> {
final GeneratedDatabase _db; @override
final GeneratedDatabase attachedDatabase;
final String? _alias; final String? _alias;
$ReactionsTable(this._db, [this._alias]); $ReactionsTable(this.attachedDatabase, [this._alias]);
final VerificationMeta _userIdMeta = const VerificationMeta('userId'); final VerificationMeta _userIdMeta = const VerificationMeta('userId');
@override @override
late final GeneratedColumn<String?> userId = GeneratedColumn<String?>( late final GeneratedColumn<String?> userId = GeneratedColumn<String?>(
@@ -3426,7 +3431,7 @@ class $ReactionsTable extends Reactions
@override @override
$ReactionsTable createAlias(String alias) { $ReactionsTable createAlias(String alias) {
return $ReactionsTable(_db, alias); return $ReactionsTable(attachedDatabase, alias);
} }
static TypeConverter<Map<String, Object?>, String> $converter0 = static TypeConverter<Map<String, Object?>, String> $converter0 =
@@ -3736,9 +3741,10 @@ class UsersCompanion extends UpdateCompanion<UserEntity> {
} }
class $UsersTable extends Users with TableInfo<$UsersTable, UserEntity> { class $UsersTable extends Users with TableInfo<$UsersTable, UserEntity> {
final GeneratedDatabase _db; @override
final GeneratedDatabase attachedDatabase;
final String? _alias; final String? _alias;
$UsersTable(this._db, [this._alias]); $UsersTable(this.attachedDatabase, [this._alias]);
final VerificationMeta _idMeta = const VerificationMeta('id'); final VerificationMeta _idMeta = const VerificationMeta('id');
@override @override
late final GeneratedColumn<String?> id = GeneratedColumn<String?>( late final GeneratedColumn<String?> id = GeneratedColumn<String?>(
@@ -3865,7 +3871,7 @@ class $UsersTable extends Users with TableInfo<$UsersTable, UserEntity> {
@override @override
$UsersTable createAlias(String alias) { $UsersTable createAlias(String alias) {
return $UsersTable(_db, alias); return $UsersTable(attachedDatabase, alias);
} }
static TypeConverter<Map<String, Object?>, String> $converter0 = static TypeConverter<Map<String, Object?>, String> $converter0 =
@@ -4235,9 +4241,10 @@ class MembersCompanion extends UpdateCompanion<MemberEntity> {
class $MembersTable extends Members class $MembersTable extends Members
with TableInfo<$MembersTable, MemberEntity> { with TableInfo<$MembersTable, MemberEntity> {
final GeneratedDatabase _db; @override
final GeneratedDatabase attachedDatabase;
final String? _alias; final String? _alias;
$MembersTable(this._db, [this._alias]); $MembersTable(this.attachedDatabase, [this._alias]);
final VerificationMeta _userIdMeta = const VerificationMeta('userId'); final VerificationMeta _userIdMeta = const VerificationMeta('userId');
@override @override
late final GeneratedColumn<String?> userId = GeneratedColumn<String?>( late final GeneratedColumn<String?> userId = GeneratedColumn<String?>(
@@ -4409,7 +4416,7 @@ class $MembersTable extends Members
@override @override
$MembersTable createAlias(String alias) { $MembersTable createAlias(String alias) {
return $MembersTable(_db, alias); return $MembersTable(attachedDatabase, alias);
} }
} }
@@ -4585,9 +4592,10 @@ class ReadsCompanion extends UpdateCompanion<ReadEntity> {
} }
class $ReadsTable extends Reads with TableInfo<$ReadsTable, ReadEntity> { class $ReadsTable extends Reads with TableInfo<$ReadsTable, ReadEntity> {
final GeneratedDatabase _db; @override
final GeneratedDatabase attachedDatabase;
final String? _alias; final String? _alias;
$ReadsTable(this._db, [this._alias]); $ReadsTable(this.attachedDatabase, [this._alias]);
final VerificationMeta _lastReadMeta = const VerificationMeta('lastRead'); final VerificationMeta _lastReadMeta = const VerificationMeta('lastRead');
@override @override
late final GeneratedColumn<DateTime?> lastRead = GeneratedColumn<DateTime?>( late final GeneratedColumn<DateTime?> lastRead = GeneratedColumn<DateTime?>(
@@ -4664,7 +4672,7 @@ class $ReadsTable extends Reads with TableInfo<$ReadsTable, ReadEntity> {
@override @override
$ReadsTable createAlias(String alias) { $ReadsTable createAlias(String alias) {
return $ReadsTable(_db, alias); return $ReadsTable(attachedDatabase, alias);
} }
} }
@@ -4789,9 +4797,10 @@ class ChannelQueriesCompanion extends UpdateCompanion<ChannelQueryEntity> {
class $ChannelQueriesTable extends ChannelQueries class $ChannelQueriesTable extends ChannelQueries
with TableInfo<$ChannelQueriesTable, ChannelQueryEntity> { with TableInfo<$ChannelQueriesTable, ChannelQueryEntity> {
final GeneratedDatabase _db; @override
final GeneratedDatabase attachedDatabase;
final String? _alias; final String? _alias;
$ChannelQueriesTable(this._db, [this._alias]); $ChannelQueriesTable(this.attachedDatabase, [this._alias]);
final VerificationMeta _queryHashMeta = const VerificationMeta('queryHash'); final VerificationMeta _queryHashMeta = const VerificationMeta('queryHash');
@override @override
late final GeneratedColumn<String?> queryHash = GeneratedColumn<String?>( late final GeneratedColumn<String?> queryHash = GeneratedColumn<String?>(
@@ -4840,7 +4849,7 @@ class $ChannelQueriesTable extends ChannelQueries
@override @override
$ChannelQueriesTable createAlias(String alias) { $ChannelQueriesTable createAlias(String alias) {
return $ChannelQueriesTable(_db, alias); return $ChannelQueriesTable(attachedDatabase, alias);
} }
} }
@@ -5105,9 +5114,10 @@ class ConnectionEventsCompanion extends UpdateCompanion<ConnectionEventEntity> {
class $ConnectionEventsTable extends ConnectionEvents class $ConnectionEventsTable extends ConnectionEvents
with TableInfo<$ConnectionEventsTable, ConnectionEventEntity> { with TableInfo<$ConnectionEventsTable, ConnectionEventEntity> {
final GeneratedDatabase _db; @override
final GeneratedDatabase attachedDatabase;
final String? _alias; final String? _alias;
$ConnectionEventsTable(this._db, [this._alias]); $ConnectionEventsTable(this.attachedDatabase, [this._alias]);
final VerificationMeta _idMeta = const VerificationMeta('id'); final VerificationMeta _idMeta = const VerificationMeta('id');
@override @override
late final GeneratedColumn<int?> id = GeneratedColumn<int?>( late final GeneratedColumn<int?> id = GeneratedColumn<int?>(
@@ -5215,7 +5225,7 @@ class $ConnectionEventsTable extends ConnectionEvents
@override @override
$ConnectionEventsTable createAlias(String alias) { $ConnectionEventsTable createAlias(String alias) {
return $ConnectionEventsTable(_db, alias); return $ConnectionEventsTable(attachedDatabase, alias);
} }
static TypeConverter<Map<String, dynamic>, String> $converter0 = static TypeConverter<Map<String, dynamic>, String> $converter0 =
@@ -1,7 +1,7 @@
name: stream_chat_persistence name: stream_chat_persistence
homepage: https://github.com/GetStream/stream-chat-flutter homepage: https://github.com/GetStream/stream-chat-flutter
description: Official Stream Chat Persistence library. Build your own chat experience using Dart and 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 repository: https://github.com/GetStream/stream-chat-flutter
issue_tracker: https://github.com/GetStream/stream-chat-flutter/issues issue_tracker: https://github.com/GetStream/stream-chat-flutter/issues
@@ -10,7 +10,7 @@ environment:
flutter: ">=1.17.0" flutter: ">=1.17.0"
dependencies: dependencies:
drift: ">=1.3.0 < 1.4.0" drift: ^1.5.0
flutter: flutter:
sdk: flutter sdk: flutter
logging: ^1.0.1 logging: ^1.0.1
@@ -19,13 +19,13 @@ dependencies:
path: ^1.8.0 path: ^1.8.0
path_provider: ^2.0.1 path_provider: ^2.0.1
sqlite3_flutter_libs: ^0.5.0 sqlite3_flutter_libs: ^0.5.0
stream_chat: ^4.0.0 stream_chat: ^4.0.1
dev_dependencies: dev_dependencies:
build_runner: ^2.0.1 build_runner: ^2.0.1
dart_code_metrics: ^4.4.0 dart_code_metrics: ^4.4.0
drift_dev: ">=1.3.0 < 1.4.0" drift_dev: ^1.5.2
flutter_test: flutter_test:
sdk: flutter sdk: flutter
mocktail: ^0.2.0 mocktail: ^0.3.0