Merge branch 'develop' into dependabot/github_actions/actions/setup-node-4
This commit is contained in:
@@ -16,7 +16,7 @@ jobs:
|
|||||||
conventional_pr_title:
|
conventional_pr_title:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: amannn/action-semantic-pull-request@v5.3.0
|
- uses: amannn/action-semantic-pull-request@v5.4.0
|
||||||
with:
|
with:
|
||||||
scopes: |
|
scopes: |
|
||||||
llc
|
llc
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ name: stream_flutter_workflow
|
|||||||
env:
|
env:
|
||||||
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
|
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
|
||||||
flutter_channel: "stable"
|
flutter_channel: "stable"
|
||||||
|
flutter_version: "3.10.6"
|
||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
@@ -36,6 +37,7 @@ jobs:
|
|||||||
- name: "Install Flutter"
|
- name: "Install Flutter"
|
||||||
uses: subosito/flutter-action@v2
|
uses: subosito/flutter-action@v2
|
||||||
with:
|
with:
|
||||||
|
flutter-version: ${{ env.flutter_version }}
|
||||||
cache: true
|
cache: true
|
||||||
channel: ${{ env.flutter_channel }}
|
channel: ${{ env.flutter_channel }}
|
||||||
- name: "Install Tools"
|
- name: "Install Tools"
|
||||||
@@ -63,6 +65,7 @@ jobs:
|
|||||||
- name: "Install Flutter"
|
- name: "Install Flutter"
|
||||||
uses: subosito/flutter-action@v2
|
uses: subosito/flutter-action@v2
|
||||||
with:
|
with:
|
||||||
|
flutter-version: ${{ env.flutter_version }}
|
||||||
cache: true
|
cache: true
|
||||||
channel: ${{ env.flutter_channel }}
|
channel: ${{ env.flutter_channel }}
|
||||||
- name: "Install Tools"
|
- name: "Install Tools"
|
||||||
@@ -88,6 +91,7 @@ jobs:
|
|||||||
- name: "Install Flutter"
|
- name: "Install Flutter"
|
||||||
uses: subosito/flutter-action@v2
|
uses: subosito/flutter-action@v2
|
||||||
with:
|
with:
|
||||||
|
flutter-version: ${{ env.flutter_version }}
|
||||||
cache: true
|
cache: true
|
||||||
channel: ${{ env.flutter_channel }}
|
channel: ${{ env.flutter_channel }}
|
||||||
- name: "Install Tools"
|
- name: "Install Tools"
|
||||||
@@ -106,27 +110,27 @@ jobs:
|
|||||||
token: ${{secrets.CODECOV_TOKEN}}
|
token: ${{secrets.CODECOV_TOKEN}}
|
||||||
files: packages/*/coverage/lcov.info
|
files: packages/*/coverage/lcov.info
|
||||||
- name: "Stream Chat Coverage Check"
|
- name: "Stream Chat Coverage Check"
|
||||||
uses: VeryGoodOpenSource/very_good_coverage@v2.1.0
|
uses: VeryGoodOpenSource/very_good_coverage@v2.2.0
|
||||||
with:
|
with:
|
||||||
path: packages/stream_chat/coverage/lcov.info
|
path: packages/stream_chat/coverage/lcov.info
|
||||||
min_coverage: 79
|
min_coverage: 79
|
||||||
- name: "Stream Chat Localizations Coverage Check"
|
- name: "Stream Chat Localizations Coverage Check"
|
||||||
uses: VeryGoodOpenSource/very_good_coverage@v2.1.0
|
uses: VeryGoodOpenSource/very_good_coverage@v2.2.0
|
||||||
with:
|
with:
|
||||||
path: packages/stream_chat_localizations/coverage/lcov.info
|
path: packages/stream_chat_localizations/coverage/lcov.info
|
||||||
min_coverage: 100
|
min_coverage: 100
|
||||||
- name: "Stream Chat Persistence Coverage Check"
|
- name: "Stream Chat Persistence Coverage Check"
|
||||||
uses: VeryGoodOpenSource/very_good_coverage@v2.1.0
|
uses: VeryGoodOpenSource/very_good_coverage@v2.2.0
|
||||||
with:
|
with:
|
||||||
path: packages/stream_chat_persistence/coverage/lcov.info
|
path: packages/stream_chat_persistence/coverage/lcov.info
|
||||||
min_coverage: 95
|
min_coverage: 95
|
||||||
- name: "Stream Chat Flutter Core Coverage Check"
|
- name: "Stream Chat Flutter Core Coverage Check"
|
||||||
uses: VeryGoodOpenSource/very_good_coverage@v2.1.0
|
uses: VeryGoodOpenSource/very_good_coverage@v2.2.0
|
||||||
with:
|
with:
|
||||||
path: packages/stream_chat_flutter_core/coverage/lcov.info
|
path: packages/stream_chat_flutter_core/coverage/lcov.info
|
||||||
min_coverage: 30
|
min_coverage: 30
|
||||||
- name: "Stream Chat Flutter Coverage Check"
|
- name: "Stream Chat Flutter Coverage Check"
|
||||||
uses: VeryGoodOpenSource/very_good_coverage@v2.1.0
|
uses: VeryGoodOpenSource/very_good_coverage@v2.2.0
|
||||||
with:
|
with:
|
||||||
path: packages/stream_chat_flutter/coverage/lcov.info
|
path: packages/stream_chat_flutter/coverage/lcov.info
|
||||||
min_coverage: 44
|
min_coverage: 44
|
||||||
|
|||||||
@@ -489,47 +489,51 @@ class _MyAppState extends State<MyApp> {
|
|||||||
|
|
||||||
late final _router = GoRouter(
|
late final _router = GoRouter(
|
||||||
initialLocation: '/',
|
initialLocation: '/',
|
||||||
navigatorBuilder: (context, state, child) {
|
|
||||||
if (state.location.startsWith('/chat')) {
|
|
||||||
wasPreviousRouteChat = true;
|
|
||||||
return StreamChat(
|
|
||||||
client: _client,
|
|
||||||
child: ChatSetup(client: _client, child: child),
|
|
||||||
);
|
|
||||||
} else {
|
|
||||||
if (wasPreviousRouteChat) {
|
|
||||||
wasPreviousRouteChat = false;
|
|
||||||
return StreamChat(
|
|
||||||
client: _client,
|
|
||||||
child: child,
|
|
||||||
);
|
|
||||||
} else {
|
|
||||||
return child;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
routes: [
|
routes: [
|
||||||
GoRoute(
|
ShellRoute(
|
||||||
path: '/',
|
builder: (context, state, child) {
|
||||||
builder: (context, state) => const HomeScreen(),
|
if (state.uri.host.startsWith('/chat')) {
|
||||||
|
wasPreviousRouteChat = true;
|
||||||
|
return StreamChat(
|
||||||
|
client: _client,
|
||||||
|
child: ChatSetup(client: _client, child: child),
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
if (wasPreviousRouteChat) {
|
||||||
|
wasPreviousRouteChat = false;
|
||||||
|
return StreamChat(
|
||||||
|
client: _client,
|
||||||
|
child: child,
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
return child;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
routes: [
|
routes: [
|
||||||
GoRoute(
|
GoRoute(
|
||||||
path: 'settings',
|
path: '/',
|
||||||
builder: (context, state) => const SettingsPage(),
|
builder: (context, state) => const HomeScreen(),
|
||||||
),
|
|
||||||
GoRoute(
|
|
||||||
path: 'chat',
|
|
||||||
builder: (context, state) => const ChannelListPage(),
|
|
||||||
routes: [
|
routes: [
|
||||||
GoRoute(
|
GoRoute(
|
||||||
path: 'channel',
|
path: 'settings',
|
||||||
builder: (context, state) {
|
builder: (context, state) => const SettingsPage(),
|
||||||
final channel = state.extra as Channel;
|
),
|
||||||
return StreamChannel(
|
GoRoute(
|
||||||
channel: channel,
|
path: 'chat',
|
||||||
child: const ChannelPage(),
|
builder: (context, state) => const ChannelListPage(),
|
||||||
);
|
routes: [
|
||||||
},
|
GoRoute(
|
||||||
|
path: 'channel',
|
||||||
|
builder: (context, state) {
|
||||||
|
final channel = state.extra as Channel;
|
||||||
|
return StreamChannel(
|
||||||
|
channel: channel,
|
||||||
|
child: const ChannelPage(),
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -1,3 +1,10 @@
|
|||||||
|
# 6.10.0
|
||||||
|
|
||||||
|
🐞 Fixed
|
||||||
|
|
||||||
|
- [[#1753]](https://github.com/GetStream/stream-chat-flutter/issues/1753) Fixed Unhandled null
|
||||||
|
check operator exception when user is removed from a channel.
|
||||||
|
|
||||||
## 6.9.0
|
## 6.9.0
|
||||||
|
|
||||||
🐞 Fixed
|
🐞 Fixed
|
||||||
|
|||||||
@@ -1658,7 +1658,7 @@ class ClientState {
|
|||||||
)
|
)
|
||||||
.listen((event) async {
|
.listen((event) async {
|
||||||
final isCurrentUser = event.user!.id == currentUser!.id;
|
final isCurrentUser = event.user!.id == currentUser!.id;
|
||||||
if (isCurrentUser) {
|
if (isCurrentUser && event.channel != null) {
|
||||||
final eventChannel = event.channel!;
|
final eventChannel = event.channel!;
|
||||||
await _client.chatPersistenceClient
|
await _client.chatPersistenceClient
|
||||||
?.deleteChannels([eventChannel.cid]);
|
?.deleteChannels([eventChannel.cid]);
|
||||||
|
|||||||
@@ -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 = '6.9.0';
|
const PACKAGE_VERSION = '6.10.0';
|
||||||
|
|||||||
@@ -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: 6.9.0
|
version: 6.10.0
|
||||||
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
|
||||||
|
|
||||||
|
|||||||
@@ -164,7 +164,8 @@ void main() {
|
|||||||
expect(
|
expect(
|
||||||
e.message,
|
e.message,
|
||||||
"The connection errored: Dio can't establish a new connection"
|
"The connection errored: Dio can't establish a new connection"
|
||||||
' after it was closed.',
|
' after it was closed. This indicates an error which most likely'
|
||||||
|
' cannot be solved by the library.',
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,3 +1,10 @@
|
|||||||
|
# 6.12.0
|
||||||
|
|
||||||
|
🐞 Fixed
|
||||||
|
|
||||||
|
- [[#1759]](https://github.com/GetStream/stream-chat-flutter/issues/1759) Fixed
|
||||||
|
The Reaction Picker is not being removed when I set showReactionPicker to false.
|
||||||
|
|
||||||
# 6.11.0
|
# 6.11.0
|
||||||
|
|
||||||
🐞 Fixed
|
🐞 Fixed
|
||||||
|
|||||||
@@ -0,0 +1,47 @@
|
|||||||
|
// ignore_for_file: public_member_api_docs
|
||||||
|
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:stream_chat_flutter/stream_chat_flutter.dart';
|
||||||
|
|
||||||
|
import 'package:stream_chat_flutter_example/debug/error_dialog.dart';
|
||||||
|
|
||||||
|
class DebugAddUser extends StatelessWidget {
|
||||||
|
const DebugAddUser({
|
||||||
|
super.key,
|
||||||
|
required this.client,
|
||||||
|
required this.channel,
|
||||||
|
});
|
||||||
|
|
||||||
|
final StreamChatClient client;
|
||||||
|
final Channel channel;
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Padding(
|
||||||
|
padding: const EdgeInsets.all(8),
|
||||||
|
child: TextField(
|
||||||
|
decoration: const InputDecoration(
|
||||||
|
labelText: 'Add User',
|
||||||
|
hintText: 'User Id',
|
||||||
|
isDense: true,
|
||||||
|
border: OutlineInputBorder(),
|
||||||
|
),
|
||||||
|
onSubmitted: (value) async {
|
||||||
|
final userId = value.trim();
|
||||||
|
try {
|
||||||
|
debugPrint('[addUser] userId: $userId');
|
||||||
|
final result = await client.addChannelMembers(
|
||||||
|
channel.id!,
|
||||||
|
channel.type,
|
||||||
|
[userId],
|
||||||
|
);
|
||||||
|
debugPrint('[addUser] result: $result');
|
||||||
|
} catch (e) {
|
||||||
|
debugPrint('[addUser] failed: $e');
|
||||||
|
showErrorDialog(context, e, 'Add User');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,47 @@
|
|||||||
|
// ignore_for_file: public_member_api_docs
|
||||||
|
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:stream_chat_flutter/stream_chat_flutter.dart';
|
||||||
|
|
||||||
|
import 'package:stream_chat_flutter_example/debug/error_dialog.dart';
|
||||||
|
|
||||||
|
class DebugRemoveUser extends StatelessWidget {
|
||||||
|
const DebugRemoveUser({
|
||||||
|
super.key,
|
||||||
|
required this.client,
|
||||||
|
required this.channel,
|
||||||
|
});
|
||||||
|
|
||||||
|
final StreamChatClient client;
|
||||||
|
final Channel channel;
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Padding(
|
||||||
|
padding: const EdgeInsets.all(8),
|
||||||
|
child: TextField(
|
||||||
|
decoration: const InputDecoration(
|
||||||
|
labelText: 'Remove User',
|
||||||
|
hintText: 'User Id',
|
||||||
|
isDense: true,
|
||||||
|
border: OutlineInputBorder(),
|
||||||
|
),
|
||||||
|
onSubmitted: (value) async {
|
||||||
|
final userId = value.trim();
|
||||||
|
try {
|
||||||
|
debugPrint('[removeUser] userId: $userId');
|
||||||
|
final result = await client.removeChannelMembers(
|
||||||
|
channel.id!,
|
||||||
|
channel.type,
|
||||||
|
[userId],
|
||||||
|
);
|
||||||
|
debugPrint('[removeUser] result: $result');
|
||||||
|
} catch (e) {
|
||||||
|
debugPrint('[removeUser] failed: $e');
|
||||||
|
showErrorDialog(context, e, 'Remove User');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -4,9 +4,11 @@ import 'dart:async';
|
|||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:stream_chat_flutter/stream_chat_flutter.dart';
|
import 'package:stream_chat_flutter/stream_chat_flutter.dart';
|
||||||
|
import 'package:stream_chat_flutter_example/debug/actions/add_user.dart';
|
||||||
import 'package:stream_chat_flutter_example/debug/actions/ban_user.dart';
|
import 'package:stream_chat_flutter_example/debug/actions/ban_user.dart';
|
||||||
import 'package:stream_chat_flutter_example/debug/actions/mute_user.dart';
|
import 'package:stream_chat_flutter_example/debug/actions/mute_user.dart';
|
||||||
import 'package:stream_chat_flutter_example/debug/actions/remove_shadow_ban.dart';
|
import 'package:stream_chat_flutter_example/debug/actions/remove_shadow_ban.dart';
|
||||||
|
import 'package:stream_chat_flutter_example/debug/actions/remove_user.dart';
|
||||||
import 'package:stream_chat_flutter_example/debug/actions/shadow_ban.dart';
|
import 'package:stream_chat_flutter_example/debug/actions/shadow_ban.dart';
|
||||||
import 'package:stream_chat_flutter_example/debug/actions/unban_user.dart';
|
import 'package:stream_chat_flutter_example/debug/actions/unban_user.dart';
|
||||||
import 'package:stream_chat_flutter_example/debug/actions/unmute_user.dart';
|
import 'package:stream_chat_flutter_example/debug/actions/unmute_user.dart';
|
||||||
@@ -82,6 +84,10 @@ class _DebugChannelPageState extends State<DebugChannelPage> {
|
|||||||
DebugShadowBan(client: _channel.client),
|
DebugShadowBan(client: _channel.client),
|
||||||
const SizedBox(height: 8),
|
const SizedBox(height: 8),
|
||||||
DebugRemoveShadowBan(client: _channel.client),
|
DebugRemoveShadowBan(client: _channel.client),
|
||||||
|
const SizedBox(height: 8),
|
||||||
|
DebugAddUser(client: _channel.client, channel: _channel),
|
||||||
|
const SizedBox(height: 8),
|
||||||
|
DebugRemoveUser(client: _channel.client, channel: _channel),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -60,7 +60,9 @@ class StreamMessageWidget extends StatefulWidget {
|
|||||||
bool? showReactionPicker,
|
bool? showReactionPicker,
|
||||||
@Deprecated('Use `showReactionPicker` instead')
|
@Deprecated('Use `showReactionPicker` instead')
|
||||||
bool showReactionPickerIndicator = true,
|
bool showReactionPickerIndicator = true,
|
||||||
@internal this.showReactionPickerTail = false,
|
@internal
|
||||||
|
@Deprecated('Use `showReactionPicker` instead')
|
||||||
|
this.showReactionPickerTail,
|
||||||
this.showUserAvatar = DisplayWidget.show,
|
this.showUserAvatar = DisplayWidget.show,
|
||||||
this.showSendingIndicator = true,
|
this.showSendingIndicator = true,
|
||||||
this.showThreadReplyIndicator = false,
|
this.showThreadReplyIndicator = false,
|
||||||
@@ -483,7 +485,8 @@ class StreamMessageWidget extends StatefulWidget {
|
|||||||
/// Whether or not to show the reaction picker tail
|
/// Whether or not to show the reaction picker tail
|
||||||
/// {@endtemplate}
|
/// {@endtemplate}
|
||||||
@internal
|
@internal
|
||||||
final bool showReactionPickerTail;
|
@Deprecated('Use `showReactionPicker` instead')
|
||||||
|
final bool? showReactionPickerTail;
|
||||||
|
|
||||||
/// {@template onShowMessage}
|
/// {@template onShowMessage}
|
||||||
/// Callback when show message is tapped
|
/// Callback when show message is tapped
|
||||||
@@ -743,8 +746,6 @@ class StreamMessageWidget extends StatefulWidget {
|
|||||||
showReactionPicker: showReactionPicker ??
|
showReactionPicker: showReactionPicker ??
|
||||||
showReactionPickerIndicator ??
|
showReactionPickerIndicator ??
|
||||||
this.showReactionPicker,
|
this.showReactionPicker,
|
||||||
showReactionPickerTail:
|
|
||||||
showReactionPickerTail ?? this.showReactionPickerTail,
|
|
||||||
onShowMessage: onShowMessage ?? this.onShowMessage,
|
onShowMessage: onShowMessage ?? this.onShowMessage,
|
||||||
showUsername: showUsername ?? this.showUsername,
|
showUsername: showUsername ?? this.showUsername,
|
||||||
showTimestamp: showTimestamp ?? this.showTimestamp,
|
showTimestamp: showTimestamp ?? this.showTimestamp,
|
||||||
@@ -1002,7 +1003,7 @@ class _StreamMessageWidgetState extends State<StreamMessageWidget>
|
|||||||
messageWidget: widget,
|
messageWidget: widget,
|
||||||
showBottomRow: showBottomRow,
|
showBottomRow: showBottomRow,
|
||||||
showPinHighlight: widget.showPinHighlight,
|
showPinHighlight: widget.showPinHighlight,
|
||||||
showReactionPickerTail: widget.showReactionPickerTail,
|
showReactionPickerTail: widget.showReactionPicker,
|
||||||
showReactions: showReactions,
|
showReactions: showReactions,
|
||||||
onReactionsTap: () {
|
onReactionsTap: () {
|
||||||
widget.onReactionsTap != null
|
widget.onReactionsTap != null
|
||||||
@@ -1217,7 +1218,8 @@ class _StreamMessageWidgetState extends State<StreamMessageWidget>
|
|||||||
translateUserAvatar: false,
|
translateUserAvatar: false,
|
||||||
showSendingIndicator: false,
|
showSendingIndicator: false,
|
||||||
padding: EdgeInsets.zero,
|
padding: EdgeInsets.zero,
|
||||||
// Show the tail if the reaction picker is visible.
|
// Show both the tail if the picker is shown.
|
||||||
|
showReactionPicker: widget.showReactionPicker,
|
||||||
showReactionPickerTail: widget.showReactionPicker,
|
showReactionPickerTail: widget.showReactionPicker,
|
||||||
showPinHighlight: false,
|
showPinHighlight: false,
|
||||||
showUserAvatar:
|
showUserAvatar:
|
||||||
@@ -1258,6 +1260,7 @@ class _StreamMessageWidgetState extends State<StreamMessageWidget>
|
|||||||
return StreamChannel(
|
return StreamChannel(
|
||||||
channel: channel,
|
channel: channel,
|
||||||
child: MessageActionsModal(
|
child: MessageActionsModal(
|
||||||
|
showReactionPicker: widget.showReactionPicker,
|
||||||
messageWidget: widget.copyWith(
|
messageWidget: widget.copyWith(
|
||||||
key: const Key('MessageWidget'),
|
key: const Key('MessageWidget'),
|
||||||
message: widget.message.copyWith(
|
message: widget.message.copyWith(
|
||||||
@@ -1271,9 +1274,6 @@ class _StreamMessageWidgetState extends State<StreamMessageWidget>
|
|||||||
translateUserAvatar: false,
|
translateUserAvatar: false,
|
||||||
showSendingIndicator: false,
|
showSendingIndicator: false,
|
||||||
padding: EdgeInsets.zero,
|
padding: EdgeInsets.zero,
|
||||||
// Show both the tail if the picker is shown.
|
|
||||||
showReactionPicker: widget.showReactionPicker,
|
|
||||||
showReactionPickerTail: widget.showReactionPicker,
|
|
||||||
showPinHighlight: false,
|
showPinHighlight: false,
|
||||||
showUserAvatar: widget.message.user!.id ==
|
showUserAvatar: widget.message.user!.id ==
|
||||||
channel.client.state.currentUser!.id
|
channel.client.state.currentUser!.id
|
||||||
|
|||||||
@@ -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: 6.11.0
|
version: 6.12.0
|
||||||
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
|
||||||
|
|
||||||
@@ -38,7 +38,7 @@ dependencies:
|
|||||||
rxdart: ^0.27.7
|
rxdart: ^0.27.7
|
||||||
share_plus: ^7.1.0
|
share_plus: ^7.1.0
|
||||||
shimmer: ^3.0.0
|
shimmer: ^3.0.0
|
||||||
stream_chat_flutter_core: ^6.10.0
|
stream_chat_flutter_core: ^6.11.0
|
||||||
synchronized: ^3.1.0
|
synchronized: ^3.1.0
|
||||||
thumblr: ^0.0.4
|
thumblr: ^0.0.4
|
||||||
url_launcher: ^6.1.12
|
url_launcher: ^6.1.12
|
||||||
|
|||||||
+95
@@ -64,6 +64,101 @@ void main() {
|
|||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
|
testWidgets(
|
||||||
|
'it should show the reaction picker',
|
||||||
|
(WidgetTester tester) async {
|
||||||
|
final client = MockClient();
|
||||||
|
final clientState = MockClientState();
|
||||||
|
final channel = MockChannel(
|
||||||
|
ownCapabilities: ['send-message', 'send-reaction'],
|
||||||
|
);
|
||||||
|
|
||||||
|
when(() => client.state).thenReturn(clientState);
|
||||||
|
when(() => clientState.currentUser).thenReturn(OwnUser(id: 'user-id'));
|
||||||
|
|
||||||
|
final themeData = ThemeData();
|
||||||
|
final streamTheme = StreamChatThemeData.fromTheme(themeData);
|
||||||
|
await tester.pumpWidget(
|
||||||
|
MaterialApp(
|
||||||
|
theme: themeData,
|
||||||
|
home: StreamChat(
|
||||||
|
streamChatThemeData: streamTheme,
|
||||||
|
client: client,
|
||||||
|
child: SizedBox(
|
||||||
|
child: StreamChannel(
|
||||||
|
channel: channel,
|
||||||
|
child: MessageActionsModal(
|
||||||
|
message: Message(
|
||||||
|
text: 'test',
|
||||||
|
user: User(
|
||||||
|
id: 'user-id',
|
||||||
|
),
|
||||||
|
state: MessageState.sent,
|
||||||
|
),
|
||||||
|
messageWidget: const Text(
|
||||||
|
'test',
|
||||||
|
key: Key('MessageWidget'),
|
||||||
|
),
|
||||||
|
messageTheme: streamTheme.ownMessageTheme,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
await tester.pumpAndSettle();
|
||||||
|
|
||||||
|
expect(find.byType(StreamReactionPicker), findsOneWidget);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
|
||||||
|
testWidgets(
|
||||||
|
'it should not show the reaction picker',
|
||||||
|
(WidgetTester tester) async {
|
||||||
|
final client = MockClient();
|
||||||
|
final clientState = MockClientState();
|
||||||
|
final channel = MockChannel();
|
||||||
|
|
||||||
|
when(() => client.state).thenReturn(clientState);
|
||||||
|
when(() => clientState.currentUser).thenReturn(OwnUser(id: 'user-id'));
|
||||||
|
|
||||||
|
final themeData = ThemeData();
|
||||||
|
final streamTheme = StreamChatThemeData.fromTheme(themeData);
|
||||||
|
await tester.pumpWidget(
|
||||||
|
MaterialApp(
|
||||||
|
theme: themeData,
|
||||||
|
home: StreamChat(
|
||||||
|
streamChatThemeData: streamTheme,
|
||||||
|
client: client,
|
||||||
|
child: SizedBox(
|
||||||
|
child: StreamChannel(
|
||||||
|
channel: channel,
|
||||||
|
child: MessageActionsModal(
|
||||||
|
showReactionPicker: false,
|
||||||
|
message: Message(
|
||||||
|
text: 'test',
|
||||||
|
user: User(
|
||||||
|
id: 'user-id',
|
||||||
|
),
|
||||||
|
state: MessageState.sent,
|
||||||
|
),
|
||||||
|
messageWidget: const Text(
|
||||||
|
'test',
|
||||||
|
key: Key('MessageWidget'),
|
||||||
|
),
|
||||||
|
messageTheme: streamTheme.ownMessageTheme,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
await tester.pumpAndSettle();
|
||||||
|
|
||||||
|
expect(find.byType(StreamReactionPicker), findsNothing);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
|
||||||
testWidgets(
|
testWidgets(
|
||||||
'it should show some actions',
|
'it should show some actions',
|
||||||
(WidgetTester tester) async {
|
(WidgetTester tester) async {
|
||||||
|
|||||||
@@ -14,6 +14,13 @@ class MockClient extends Mock implements StreamChatClient {
|
|||||||
class MockClientState extends Mock implements ClientState {}
|
class MockClientState extends Mock implements ClientState {}
|
||||||
|
|
||||||
class MockChannel extends Mock implements Channel {
|
class MockChannel extends Mock implements Channel {
|
||||||
|
MockChannel({
|
||||||
|
this.ownCapabilities = const ['send-message'],
|
||||||
|
});
|
||||||
|
|
||||||
|
@override
|
||||||
|
final List<String> ownCapabilities;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Future<bool> get initialized async => true;
|
Future<bool> get initialized async => true;
|
||||||
|
|
||||||
@@ -22,9 +29,6 @@ class MockChannel extends Mock implements Channel {
|
|||||||
Future<void> keyStroke([String? parentId]) async {
|
Future<void> keyStroke([String? parentId]) async {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
|
||||||
List<String> get ownCapabilities => ['send-message'];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class MockChannelState extends Mock implements ChannelClientState {
|
class MockChannelState extends Mock implements ChannelClientState {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
## UNRELEASED
|
## 6.11.0
|
||||||
|
|
||||||
🐞 Fixed
|
🐞 Fixed
|
||||||
|
|
||||||
|
|||||||
@@ -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: 6.10.0
|
version: 6.11.0
|
||||||
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
|
||||||
|
|
||||||
@@ -11,13 +11,13 @@ environment:
|
|||||||
|
|
||||||
dependencies:
|
dependencies:
|
||||||
collection: ^1.17.1
|
collection: ^1.17.1
|
||||||
connectivity_plus: ^4.0.2
|
connectivity_plus: ">=4.0.2 <6.0.0"
|
||||||
flutter:
|
flutter:
|
||||||
sdk: flutter
|
sdk: flutter
|
||||||
freezed_annotation: ^2.4.1
|
freezed_annotation: ^2.4.1
|
||||||
meta: ^1.9.1
|
meta: ^1.9.1
|
||||||
rxdart: ^0.27.7
|
rxdart: ^0.27.7
|
||||||
stream_chat: ^6.9.0
|
stream_chat: ^6.10.0
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
build_runner: ^2.4.6
|
build_runner: ^2.4.6
|
||||||
|
|||||||
@@ -1,3 +1,7 @@
|
|||||||
|
## 5.12.0
|
||||||
|
|
||||||
|
* Updated `stream_chat_flutter` dependency to [`6.12.0`](https://pub.dev/packages/stream_chat_flutter/changelog).
|
||||||
|
|
||||||
## 5.11.0
|
## 5.11.0
|
||||||
|
|
||||||
* Updated `stream_chat_flutter` dependency to [`6.11.0`](https://pub.dev/packages/stream_chat_flutter/changelog).
|
* Updated `stream_chat_flutter` dependency to [`6.11.0`](https://pub.dev/packages/stream_chat_flutter/changelog).
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
name: stream_chat_localizations
|
name: stream_chat_localizations
|
||||||
description: The Official localizations for Stream Chat Flutter, a service for building chat applications
|
description: The Official localizations for Stream Chat Flutter, a service for building chat applications
|
||||||
version: 5.11.0
|
version: 5.12.0
|
||||||
homepage: https://github.com/GetStream/stream-chat-flutter
|
homepage: https://github.com/GetStream/stream-chat-flutter
|
||||||
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
|
||||||
@@ -14,7 +14,7 @@ dependencies:
|
|||||||
sdk: flutter
|
sdk: flutter
|
||||||
flutter_localizations:
|
flutter_localizations:
|
||||||
sdk: flutter
|
sdk: flutter
|
||||||
stream_chat_flutter: ^6.11.0
|
stream_chat_flutter: ^6.12.0
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
flutter_test:
|
flutter_test:
|
||||||
|
|||||||
@@ -1,3 +1,7 @@
|
|||||||
|
## 6.10.0
|
||||||
|
|
||||||
|
- Updated `stream_chat` dependency to [`6.10.0`](https://pub.dev/packages/stream_chat/changelog).
|
||||||
|
|
||||||
## 6.9.0
|
## 6.9.0
|
||||||
|
|
||||||
- Updated `stream_chat` dependency to [`6.9.0`](https://pub.dev/packages/stream_chat/changelog).
|
- Updated `stream_chat` dependency to [`6.9.0`](https://pub.dev/packages/stream_chat/changelog).
|
||||||
|
|||||||
@@ -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: 6.9.0
|
version: 6.10.0
|
||||||
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
|
||||||
|
|
||||||
@@ -18,7 +18,7 @@ dependencies:
|
|||||||
path: ^1.8.3
|
path: ^1.8.3
|
||||||
path_provider: ^2.1.0
|
path_provider: ^2.1.0
|
||||||
sqlite3_flutter_libs: ^0.5.15
|
sqlite3_flutter_libs: ^0.5.15
|
||||||
stream_chat: ^6.9.0
|
stream_chat: ^6.10.0
|
||||||
|
|
||||||
dev_dependencies:
|
dev_dependencies:
|
||||||
build_runner: ^2.4.6
|
build_runner: ^2.4.6
|
||||||
|
|||||||
Reference in New Issue
Block a user