Merge branch 'overlay-portal' of github.com:GetStream/stream-chat-flutter into overlay-portal
This commit is contained in:
@@ -29,7 +29,7 @@ class MessageSearchPage extends StatelessWidget {
|
||||
child: MessageSearchListView(
|
||||
filters: Filter.in_('members', [StreamChat.of(context).user!.id],),
|
||||
messageQuery: 'your query here',
|
||||
paginationParams: PaginationParams(limit: 20),
|
||||
limit: 20,
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
@@ -28,9 +28,9 @@ class MessageSearchPage extends StatelessWidget {
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
body: MessageSearchListCore(
|
||||
messageQuery: _messageFilter,
|
||||
filters: _channelsFilter,
|
||||
paginationParams: PaginationParams(limit: 20),
|
||||
messageQuery: _messageFilter,
|
||||
filters: _channelsFilter,
|
||||
limit: 20,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
## Upcoming
|
||||
|
||||
🐞 Fixed
|
||||
|
||||
- [[#710]](https://github.com/GetStream/stream-chat-flutter/issues/710) Fixed JWT requiring using `String` as id.
|
||||
|
||||
## 3.0.0
|
||||
|
||||
🛑️ Breaking Changes from `2.2.1`
|
||||
|
||||
- Added 6 new methods in `ChatPersistenceClient`.
|
||||
@@ -16,13 +22,16 @@
|
||||
- Added support for `next`, `previous` value pagination in `client.search`
|
||||
, [read more.](https://getstream.io/chat/docs/other-rest/search/#pagination)
|
||||
- `Attachment` class now has a `fileSize` and `mimeType` property. Setting a `file` will also set the `file_size`
|
||||
, `mime_type` key on `extraData`, so `attachment.fileSize`, `attachment.mimetype` and `attachment.extraData['file_size']`
|
||||
, `mime_type` key on `extraData`, so `attachment.fileSize`, `attachment.mimetype`
|
||||
and `attachment.extraData['file_size']`
|
||||
, `attachment.extraData['mime_type]` is same respectively.
|
||||
|
||||
🐞 Fixed
|
||||
|
||||
- [[#659]](https://github.com/GetStream/stream-chat-flutter/issues/659) Fixed unread count not updating correctly.
|
||||
- Fix `Filter.empty()` json encoding.
|
||||
- [[#700]](https://github.com/GetStream/stream-chat-flutter/issues/700) Connecting user without providing `name`
|
||||
uses `id` instead for setting `user.name`.
|
||||
|
||||
## 2.2.1
|
||||
|
||||
|
||||
@@ -143,9 +143,6 @@ class StreamChatClient {
|
||||
|
||||
late final RetryPolicy _retryPolicy;
|
||||
|
||||
/// sync state of the channels present inside state, defaults to false
|
||||
bool _synced = false;
|
||||
|
||||
/// the last dateTime at the which all the channels were synced
|
||||
DateTime? _lastSyncedAt;
|
||||
|
||||
@@ -406,10 +403,6 @@ class StreamChatClient {
|
||||
if (event.type == EventType.healthCheck) {
|
||||
return _handleHealthCheckEvent(event);
|
||||
}
|
||||
if (!event.isLocal && _synced) {
|
||||
_lastSyncedAt = event.createdAt;
|
||||
_chatPersistenceClient?.updateLastSyncAt(event.createdAt);
|
||||
}
|
||||
state.updateUser(event.user);
|
||||
return _eventController.add(event);
|
||||
}
|
||||
@@ -438,8 +431,6 @@ class StreamChatClient {
|
||||
type: EventType.connectionRecovered,
|
||||
online: true,
|
||||
));
|
||||
} else {
|
||||
_synced = false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -464,13 +455,11 @@ class StreamChatClient {
|
||||
Future<void> sync({List<String>? cids, DateTime? lastSyncAt}) async {
|
||||
cids ??= await _chatPersistenceClient?.getChannelCids();
|
||||
if (cids == null || cids.isEmpty) {
|
||||
_synced = true;
|
||||
return;
|
||||
}
|
||||
|
||||
lastSyncAt ??= await _chatPersistenceClient?.getLastSyncAt();
|
||||
if (lastSyncAt == null) {
|
||||
_synced = true;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -488,12 +477,10 @@ class StreamChatClient {
|
||||
handleEvent(event);
|
||||
}
|
||||
|
||||
_synced = true;
|
||||
final now = DateTime.now();
|
||||
_lastSyncedAt = now;
|
||||
_chatPersistenceClient?.updateLastSyncAt(now);
|
||||
} catch (e, stk) {
|
||||
_synced = false;
|
||||
logger.severe('Error during sync', e, stk);
|
||||
}
|
||||
}
|
||||
@@ -1325,6 +1312,7 @@ class StreamChatClient {
|
||||
// resetting state
|
||||
state.dispose();
|
||||
state = ClientState(this);
|
||||
_lastSyncedAt = null;
|
||||
|
||||
// resetting credentials
|
||||
_tokenManager.reset();
|
||||
|
||||
@@ -6,8 +6,8 @@ import 'package:rxdart/rxdart.dart';
|
||||
import 'package:stream_chat/src/client/channel.dart';
|
||||
import 'package:stream_chat/src/client/retry_policy.dart';
|
||||
import 'package:stream_chat/src/core/error/error.dart';
|
||||
import 'package:stream_chat/src/event_type.dart';
|
||||
import 'package:stream_chat/src/core/models/message.dart';
|
||||
import 'package:stream_chat/src/event_type.dart';
|
||||
import 'package:stream_chat/stream_chat.dart';
|
||||
|
||||
/// The retry queue associated to a channel
|
||||
|
||||
@@ -46,12 +46,16 @@ class Token extends Equatable {
|
||||
/// Creates a [Token] instance from the provided [rawValue] if it's valid.
|
||||
factory Token.fromRawValue(String rawValue) {
|
||||
final jwtBody = JsonWebToken.unverified(rawValue);
|
||||
final userId = jwtBody.claims.getTyped<String>('user_id');
|
||||
final userId = jwtBody.claims.getTyped('user_id');
|
||||
assert(
|
||||
userId != null,
|
||||
'Invalid `token`, It should contain `user_id`',
|
||||
);
|
||||
return Token._(rawValue: rawValue, userId: userId!, authType: AuthType.jwt);
|
||||
return Token._(
|
||||
rawValue: rawValue,
|
||||
userId: userId!.toString(),
|
||||
authType: AuthType.jwt,
|
||||
);
|
||||
}
|
||||
|
||||
/// The token which can be used during the development.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import 'package:json_annotation/json_annotation.dart';
|
||||
import 'package:stream_chat/src/core/models/channel_config.dart';
|
||||
import 'package:stream_chat/src/core/util/serializer.dart';
|
||||
import 'package:stream_chat/src/core/models/user.dart';
|
||||
import 'package:stream_chat/src/core/util/serializer.dart';
|
||||
|
||||
part 'channel_model.g.dart';
|
||||
|
||||
|
||||
@@ -54,8 +54,6 @@ class OwnUser extends User {
|
||||
factory OwnUser.fromUser(User user) => OwnUser(
|
||||
id: user.id,
|
||||
role: user.role,
|
||||
name: user.name,
|
||||
image: user.image,
|
||||
createdAt: user.createdAt,
|
||||
updatedAt: user.updatedAt,
|
||||
lastActive: user.lastActive,
|
||||
@@ -116,8 +114,6 @@ class OwnUser extends User {
|
||||
return copyWith(
|
||||
id: other.id,
|
||||
role: other.role,
|
||||
name: other.name,
|
||||
image: other.image,
|
||||
banned: other.banned,
|
||||
channelMutes: other.channelMutes,
|
||||
createdAt: other.createdAt,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import 'package:json_annotation/json_annotation.dart';
|
||||
import 'package:stream_chat/src/core/util/serializer.dart';
|
||||
import 'package:stream_chat/src/core/models/user.dart';
|
||||
import 'package:stream_chat/src/core/util/serializer.dart';
|
||||
|
||||
part 'reaction.g.dart';
|
||||
|
||||
|
||||
@@ -6,15 +6,15 @@ import 'package:logging/logging.dart';
|
||||
import 'package:meta/meta.dart';
|
||||
import 'package:rxdart/rxdart.dart';
|
||||
import 'package:stream_chat/src/core/error/error.dart';
|
||||
import 'package:stream_chat/src/ws/connection_status.dart';
|
||||
import 'package:stream_chat/src/core/http/token.dart';
|
||||
import 'package:stream_chat/src/core/http/token_manager.dart';
|
||||
import 'package:stream_chat/src/core/models/event.dart';
|
||||
import 'package:stream_chat/src/core/models/user.dart';
|
||||
import 'package:stream_chat/src/event_type.dart';
|
||||
import 'package:stream_chat/src/ws/connection_status.dart';
|
||||
import 'package:stream_chat/src/ws/timer_helper.dart';
|
||||
import 'package:web_socket_channel/web_socket_channel.dart';
|
||||
import 'package:web_socket_channel/status.dart' as status;
|
||||
import 'package:web_socket_channel/web_socket_channel.dart';
|
||||
|
||||
/// Typedef which exposes an [Event] as the only parameter.
|
||||
typedef EventHandler = void Function(Event);
|
||||
|
||||
@@ -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 = '2.2.1';
|
||||
const PACKAGE_VERSION = '3.0.0';
|
||||
|
||||
@@ -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: 2.2.1
|
||||
version: 3.0.0
|
||||
repository: https://github.com/GetStream/stream-chat-flutter
|
||||
issue_tracker: https://github.com/GetStream/stream-chat-flutter/issues
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:test/test.dart';
|
||||
import 'package:stream_chat/src/core/api/responses.dart';
|
||||
import 'package:stream_chat/src/core/models/device.dart';
|
||||
import 'package:stream_chat/src/core/models/member.dart';
|
||||
@@ -8,6 +7,7 @@ import 'package:stream_chat/src/core/models/message.dart';
|
||||
import 'package:stream_chat/src/core/models/reaction.dart';
|
||||
import 'package:stream_chat/src/core/models/read.dart';
|
||||
import 'package:stream_chat/stream_chat.dart';
|
||||
import 'package:test/test.dart';
|
||||
|
||||
void main() {
|
||||
group('src/api/responses', () {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:test/test.dart';
|
||||
import 'package:stream_chat/src/core/models/filter.dart';
|
||||
import 'package:test/test.dart';
|
||||
|
||||
void main() {
|
||||
group('operators', () {
|
||||
|
||||
@@ -175,5 +175,26 @@ void main() {
|
||||
expect(newUser.teams, ['team1', 'team2']);
|
||||
expect(newUser.language, 'fr');
|
||||
});
|
||||
|
||||
test(
|
||||
'fromUser should not override name with id if not available in extraData',
|
||||
() {
|
||||
final user = User(id: 'test-id');
|
||||
expect(user.id, 'test-id');
|
||||
expect(user.name, 'test-id');
|
||||
|
||||
final encodedUser = user.toJson();
|
||||
expect(encodedUser['id'], 'test-id');
|
||||
expect(encodedUser['name'], null);
|
||||
|
||||
final ownUser = OwnUser.fromUser(user);
|
||||
expect(user.id, 'test-id');
|
||||
expect(user.name, 'test-id');
|
||||
|
||||
final encodedOwnUser = ownUser.toJson();
|
||||
expect(encodedOwnUser['id'], 'test-id');
|
||||
expect(encodedOwnUser['name'], null);
|
||||
},
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import 'package:test/test.dart';
|
||||
import 'package:stream_chat/src/core/util/serializer.dart';
|
||||
import 'package:test/test.dart';
|
||||
|
||||
void main() {
|
||||
group('src/models/serialization', () {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import 'package:test/test.dart';
|
||||
import 'package:stream_chat/src/core/util/extension.dart';
|
||||
import 'package:test/test.dart';
|
||||
|
||||
void main() {
|
||||
test('`.withNullifyer` converts the type into non-nullable', () {
|
||||
|
||||
@@ -6,11 +6,11 @@ import 'package:rxdart/rxdart.dart';
|
||||
import 'package:stream_chat/src/core/api/channel_api.dart';
|
||||
import 'package:stream_chat/src/core/api/device_api.dart';
|
||||
import 'package:stream_chat/src/core/api/general_api.dart';
|
||||
import 'package:stream_chat/src/core/api/guest_api.dart';
|
||||
import 'package:stream_chat/src/core/api/message_api.dart';
|
||||
import 'package:stream_chat/src/core/api/moderation_api.dart';
|
||||
import 'package:stream_chat/src/core/api/stream_chat_api.dart';
|
||||
import 'package:stream_chat/src/core/api/user_api.dart';
|
||||
import 'package:stream_chat/src/core/api/guest_api.dart';
|
||||
import 'package:stream_chat/src/core/http/token.dart';
|
||||
import 'package:stream_chat/src/core/http/token_manager.dart';
|
||||
import 'package:stream_chat/src/ws/websocket.dart';
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import 'dart:async';
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:mocktail/mocktail.dart';
|
||||
import 'package:stream_chat/src/core/http/token_manager.dart';
|
||||
import 'package:stream_chat/src/ws/websocket.dart';
|
||||
import 'package:stream_chat/stream_chat.dart';
|
||||
import 'package:test/test.dart';
|
||||
import 'package:mocktail/mocktail.dart';
|
||||
import 'package:stream_chat/src/ws/websocket.dart';
|
||||
import 'package:web_socket_channel/web_socket_channel.dart';
|
||||
|
||||
import '../fakes.dart';
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
## Upcoming
|
||||
## 3.0.0
|
||||
|
||||
- Updated `stream_chat_flutter_core` dependency to [`3.0.0`](https://pub.dev/packages/stream_chat_flutter_core/changelog).
|
||||
|
||||
🛑️ Breaking Changes from `2.2.1`
|
||||
|
||||
- `UserListView` `filter` property now is non-nullable.
|
||||
|
||||
🐞 Fixed
|
||||
|
||||
@@ -7,10 +13,12 @@
|
||||
- [[#349]](https://github.com/GetStream/stream-chat-flutter/issues/349): Fix `MessageInput` attachment render overflow error.
|
||||
- `MessageInput` overlays now follow the `MessageInput` focus.
|
||||
- [[#674]](https://github.com/GetStream/stream-chat-flutter/issues/674): Check scrollController is attached before calling jump in MessageListView.
|
||||
- Fixed `MessageListView` header and footer when `reverse: false`.
|
||||
|
||||
🔄 Changed
|
||||
|
||||
- Animation curves changed from default `Curves.linear` to `Curves.easeOut` and `Curves.easeIn` for attachment controls.
|
||||
- Removed default padding in `DateDivider` in `MessageListView`
|
||||
|
||||
✅ Added
|
||||
|
||||
|
||||
@@ -106,9 +106,7 @@ class ChannelListPage extends StatelessWidget {
|
||||
[StreamChat.of(context).currentUser!.id],
|
||||
),
|
||||
sort: const [SortOption('last_message_at')],
|
||||
pagination: const PaginationParams(
|
||||
limit: 20,
|
||||
),
|
||||
limit: 20,
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
@@ -83,9 +83,7 @@ class ChannelListPage extends StatelessWidget {
|
||||
[StreamChat.of(context).currentUser!.id],
|
||||
),
|
||||
sort: const [SortOption('last_message_at')],
|
||||
pagination: const PaginationParams(
|
||||
limit: 20,
|
||||
),
|
||||
limit: 20,
|
||||
channelWidget: const ChannelPage(),
|
||||
),
|
||||
),
|
||||
|
||||
@@ -85,9 +85,7 @@ class ChannelListPage extends StatelessWidget {
|
||||
),
|
||||
channelPreviewBuilder: _channelPreviewBuilder,
|
||||
// sort: [SortOption('last_message_at')],
|
||||
pagination: const PaginationParams(
|
||||
limit: 20,
|
||||
),
|
||||
limit: 20,
|
||||
channelWidget: const ChannelPage(),
|
||||
),
|
||||
),
|
||||
|
||||
@@ -69,9 +69,7 @@ class ChannelListPage extends StatelessWidget {
|
||||
[StreamChat.of(context).currentUser!.id],
|
||||
),
|
||||
sort: const [SortOption('last_message_at')],
|
||||
pagination: const PaginationParams(
|
||||
limit: 20,
|
||||
),
|
||||
limit: 20,
|
||||
channelWidget: const ChannelPage(),
|
||||
),
|
||||
),
|
||||
|
||||
@@ -75,9 +75,7 @@ class ChannelListPage extends StatelessWidget {
|
||||
[StreamChat.of(context).currentUser!.id],
|
||||
),
|
||||
sort: const [SortOption('last_message_at')],
|
||||
pagination: const PaginationParams(
|
||||
limit: 20,
|
||||
),
|
||||
limit: 20,
|
||||
channelWidget: const ChannelPage(),
|
||||
),
|
||||
),
|
||||
|
||||
@@ -102,9 +102,7 @@ class ChannelListPage extends StatelessWidget {
|
||||
[StreamChat.of(context).currentUser!.id],
|
||||
),
|
||||
sort: const [SortOption('last_message_at')],
|
||||
pagination: const PaginationParams(
|
||||
limit: 20,
|
||||
),
|
||||
limit: 20,
|
||||
channelWidget: const ChannelPage(),
|
||||
),
|
||||
),
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:stream_chat_flutter/src/extension.dart';
|
||||
import 'package:stream_chat_flutter/src/upload_progress_indicator.dart';
|
||||
import 'package:stream_chat_flutter/stream_chat_flutter.dart';
|
||||
import 'package:stream_chat_flutter/src/extension.dart';
|
||||
|
||||
/// Widget to build in progress
|
||||
typedef InProgressBuilder = Widget Function(BuildContext, int, int);
|
||||
|
||||
@@ -1,15 +1,14 @@
|
||||
import 'package:cached_network_image/cached_network_image.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:shimmer/shimmer.dart';
|
||||
import 'package:stream_chat_flutter/src/attachment/attachment_widget.dart';
|
||||
import 'package:stream_chat_flutter/src/extension.dart';
|
||||
import 'package:stream_chat_flutter/src/stream_chat_theme.dart';
|
||||
import 'package:stream_chat_flutter/src/stream_svg_icon.dart';
|
||||
import 'package:stream_chat_flutter/src/upload_progress_indicator.dart';
|
||||
import 'package:stream_chat_flutter/src/utils.dart';
|
||||
import 'package:stream_chat_flutter/src/video_thumbnail_image.dart';
|
||||
import 'package:stream_chat_flutter_core/stream_chat_flutter_core.dart';
|
||||
import 'package:stream_chat_flutter/src/extension.dart';
|
||||
|
||||
import 'package:stream_chat_flutter/src/attachment/attachment_widget.dart';
|
||||
|
||||
/// Widget for displaying file attachments
|
||||
class FileAttachment extends AttachmentWidget {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:stream_chat_flutter/src/channel_info.dart';
|
||||
import 'package:stream_chat_flutter/stream_chat_flutter.dart';
|
||||
import 'package:stream_chat_flutter/src/extension.dart';
|
||||
import 'package:stream_chat_flutter/stream_chat_flutter.dart';
|
||||
|
||||
/// Bottom Sheet with options
|
||||
class ChannelBottomSheet extends StatefulWidget {
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:stream_chat_flutter/src/back_button.dart';
|
||||
import 'package:stream_chat_flutter/src/channel_info.dart';
|
||||
import 'package:stream_chat_flutter/src/channel_name.dart';
|
||||
import 'package:stream_chat_flutter/src/extension.dart';
|
||||
import 'package:stream_chat_flutter/src/info_tile.dart';
|
||||
import 'package:stream_chat_flutter/src/stream_chat_theme.dart';
|
||||
import 'package:stream_chat_flutter/stream_chat_flutter.dart';
|
||||
import 'package:stream_chat_flutter_core/stream_chat_flutter_core.dart';
|
||||
import 'package:stream_chat_flutter/src/extension.dart';
|
||||
|
||||
/// 
|
||||
/// 
|
||||
@@ -137,12 +138,17 @@ class ChannelHeader extends StatelessWidget implements PreferredSizeWidget {
|
||||
break;
|
||||
}
|
||||
|
||||
final theme = Theme.of(context);
|
||||
|
||||
return InfoTile(
|
||||
showMessage: showConnectionStateTile && showStatus,
|
||||
message: statusString,
|
||||
child: AppBar(
|
||||
textTheme: Theme.of(context).textTheme,
|
||||
brightness: Theme.of(context).brightness,
|
||||
toolbarTextStyle: theme.textTheme.bodyText2,
|
||||
titleTextStyle: theme.textTheme.headline6,
|
||||
systemOverlayStyle: theme.brightness == Brightness.dark
|
||||
? SystemUiOverlayStyle.light
|
||||
: SystemUiOverlayStyle.dark,
|
||||
elevation: 1,
|
||||
leading: leadingWidget,
|
||||
backgroundColor: backgroundColor ?? channelHeaderTheme.color,
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import 'package:collection/collection.dart' show IterableExtension;
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:jiffy/jiffy.dart';
|
||||
import 'package:stream_chat_flutter/stream_chat_flutter.dart';
|
||||
import 'package:stream_chat_flutter/src/extension.dart';
|
||||
import 'package:stream_chat_flutter/stream_chat_flutter.dart';
|
||||
|
||||
/// Widget which shows channel info
|
||||
class ChannelInfo extends StatelessWidget {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import 'dart:ui';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
import 'package:stream_chat_flutter/src/extension.dart';
|
||||
import 'package:stream_chat_flutter/src/stream_neumorphic_button.dart';
|
||||
@@ -121,12 +122,16 @@ class ChannelListHeader extends StatelessWidget implements PreferredSizeWidget {
|
||||
|
||||
final chatThemeData = StreamChatTheme.of(context);
|
||||
final channelListHeaderThemeData = ChannelListHeaderTheme.of(context);
|
||||
final theme = Theme.of(context);
|
||||
return InfoTile(
|
||||
showMessage: showConnectionStateTile && showStatus,
|
||||
message: statusString,
|
||||
child: AppBar(
|
||||
textTheme: Theme.of(context).textTheme,
|
||||
brightness: Theme.of(context).brightness,
|
||||
toolbarTextStyle: theme.textTheme.bodyText2,
|
||||
titleTextStyle: theme.textTheme.headline6,
|
||||
systemOverlayStyle: theme.brightness == Brightness.dark
|
||||
? SystemUiOverlayStyle.light
|
||||
: SystemUiOverlayStyle.dark,
|
||||
elevation: 1,
|
||||
backgroundColor:
|
||||
backgroundColor ?? channelListHeaderThemeData.color,
|
||||
|
||||
@@ -4,11 +4,11 @@ import 'package:flutter/material.dart';
|
||||
import 'package:flutter_slidable/flutter_slidable.dart';
|
||||
import 'package:shimmer/shimmer.dart';
|
||||
import 'package:stream_chat_flutter/src/channel_bottom_sheet.dart';
|
||||
import 'package:stream_chat_flutter/src/extension.dart';
|
||||
import 'package:stream_chat_flutter/src/stream_svg_icon.dart';
|
||||
import 'package:stream_chat_flutter/src/theme/themes.dart';
|
||||
import 'package:stream_chat_flutter/stream_chat_flutter.dart';
|
||||
import 'package:stream_chat_flutter_core/stream_chat_flutter_core.dart';
|
||||
import 'package:stream_chat_flutter/src/extension.dart';
|
||||
|
||||
/// Callback called when tapping on a channel
|
||||
typedef ChannelTapCallback = void Function(Channel, Widget?);
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/rendering.dart';
|
||||
import 'package:stream_chat_flutter/src/extension.dart';
|
||||
import 'package:stream_chat_flutter/stream_chat_flutter.dart';
|
||||
import 'package:stream_chat_flutter_core/stream_chat_flutter_core.dart';
|
||||
import 'package:stream_chat_flutter/src/extension.dart';
|
||||
|
||||
/// It shows the current [Channel] name using a [Text] widget.
|
||||
///
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:jiffy/jiffy.dart';
|
||||
import 'package:stream_chat_flutter/src/stream_chat_theme.dart';
|
||||
import 'package:stream_chat_flutter/src/extension.dart';
|
||||
import 'package:stream_chat_flutter/src/stream_chat_theme.dart';
|
||||
|
||||
/// It shows a date divider depending on the date difference
|
||||
class DateDivider extends StatelessWidget {
|
||||
|
||||
@@ -26,7 +26,8 @@
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
import 'package:collection/collection.dart' show IterableExtension;
|
||||
import 'package:collection/collection.dart'
|
||||
show IterableExtension, ListEquality;
|
||||
|
||||
/// All Groups
|
||||
enum EmojiGroup {
|
||||
@@ -114240,7 +114241,6 @@ final emojiRegex = RegExp(
|
||||
class Emoji {
|
||||
static const variationSelector16 = 65039;
|
||||
static const ZWJ = 8205;
|
||||
|
||||
final String? name;
|
||||
final String? char;
|
||||
final String? shortName;
|
||||
@@ -114252,14 +114252,39 @@ class Emoji {
|
||||
|
||||
/// Emoji class.
|
||||
/// [name] of emoji. [char] and character of emoji. [shortName] and a digest name of emoji, [emojiGroup] is emoji's group and [emojiSubgroup] is emoji's subgroup. [keywords] list of keywords for emoji. [modifiable] `true` if emoji has skin.
|
||||
Emoji(
|
||||
{this.name,
|
||||
this.char,
|
||||
this.shortName,
|
||||
this.emojiGroup,
|
||||
this.emojiSubgroup,
|
||||
this.keywords = const [],
|
||||
this.modifiable = false});
|
||||
Emoji({
|
||||
this.name,
|
||||
this.char,
|
||||
this.shortName,
|
||||
this.emojiGroup,
|
||||
this.emojiSubgroup,
|
||||
this.keywords = const [],
|
||||
this.modifiable = false,
|
||||
});
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) =>
|
||||
identical(this, other) ||
|
||||
other is Emoji &&
|
||||
runtimeType == other.runtimeType &&
|
||||
name == other.name &&
|
||||
char == other.char &&
|
||||
shortName == other.shortName &&
|
||||
emojiGroup == other.emojiGroup &&
|
||||
emojiSubgroup == other.emojiSubgroup &&
|
||||
const ListEquality().equals(keywords, other.keywords) &&
|
||||
modifiable == other.modifiable;
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hash(
|
||||
name.hashCode,
|
||||
char.hashCode,
|
||||
shortName.hashCode,
|
||||
emojiGroup.hashCode,
|
||||
emojiSubgroup.hashCode,
|
||||
keywords.hashCode,
|
||||
modifiable.hashCode,
|
||||
);
|
||||
|
||||
/// Runes of Emoji Character
|
||||
List<int> get charRunes {
|
||||
@@ -114339,9 +114364,11 @@ class Emoji {
|
||||
return _emojis.firstWhereOrNull((Emoji emoji) => emoji.name == name);
|
||||
}
|
||||
|
||||
/// Returns Emoji by [name] as short name.
|
||||
static Emoji? byShortName(String name) {
|
||||
return _emojis.firstWhereOrNull((Emoji emoji) => emoji.char == name);
|
||||
/// Returns Emoji by [shortName] as short name.
|
||||
static Emoji? byShortName(String shortName) {
|
||||
return _emojis.firstWhereOrNull(
|
||||
(Emoji emoji) => emoji.shortName == shortName,
|
||||
);
|
||||
}
|
||||
|
||||
/// Returns list of Emojis in a same [group]
|
||||
|
||||
@@ -5,11 +5,11 @@ import 'package:cached_network_image/cached_network_image.dart';
|
||||
import 'package:chewie/chewie.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:photo_view/photo_view.dart';
|
||||
import 'package:stream_chat_flutter/src/extension.dart';
|
||||
import 'package:stream_chat_flutter/src/gallery_footer.dart';
|
||||
import 'package:stream_chat_flutter/src/gallery_header.dart';
|
||||
import 'package:stream_chat_flutter/stream_chat_flutter.dart';
|
||||
import 'package:video_player/video_player.dart';
|
||||
import 'package:stream_chat_flutter/src/extension.dart';
|
||||
|
||||
/// Return action for coming back from pages
|
||||
enum ReturnActionType {
|
||||
@@ -112,6 +112,8 @@ class _FullScreenMediaState extends State<FullScreenMedia>
|
||||
attachment.assetUrl ??
|
||||
attachment.thumbUrl;
|
||||
return PhotoView(
|
||||
loadingBuilder: (context, image) =>
|
||||
const Offstage(),
|
||||
imageProvider: (imageUrl == null &&
|
||||
attachment.localUri != null &&
|
||||
attachment.file?.bytes != null)
|
||||
|
||||
@@ -7,12 +7,12 @@ import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:path_provider/path_provider.dart';
|
||||
import 'package:share_plus/share_plus.dart';
|
||||
import 'package:stream_chat_flutter/src/extension.dart';
|
||||
import 'package:stream_chat_flutter/src/stream_chat_theme.dart';
|
||||
import 'package:stream_chat_flutter/src/theme/themes.dart';
|
||||
import 'package:stream_chat_flutter/src/video_thumbnail_image.dart';
|
||||
import 'package:stream_chat_flutter/stream_chat_flutter.dart';
|
||||
import 'package:stream_chat_flutter_core/stream_chat_flutter_core.dart';
|
||||
import 'package:stream_chat_flutter/src/extension.dart';
|
||||
|
||||
/// Footer widget for media display
|
||||
class GalleryFooter extends StatefulWidget implements PreferredSizeWidget {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:stream_chat_flutter/src/attachment_actions_modal.dart';
|
||||
import 'package:stream_chat_flutter/src/stream_chat_theme.dart';
|
||||
import 'package:stream_chat_flutter/src/stream_svg_icon.dart';
|
||||
@@ -57,9 +58,13 @@ class GalleryHeader extends StatelessWidget implements PreferredSizeWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final galleryHeaderThemeData = GalleryHeaderTheme.of(context);
|
||||
final theme = Theme.of(context);
|
||||
return AppBar(
|
||||
textTheme: Theme.of(context).textTheme,
|
||||
brightness: Theme.of(context).brightness,
|
||||
toolbarTextStyle: theme.textTheme.bodyText2,
|
||||
titleTextStyle: theme.textTheme.headline6,
|
||||
systemOverlayStyle: theme.brightness == Brightness.dark
|
||||
? SystemUiOverlayStyle.light
|
||||
: SystemUiOverlayStyle.dark,
|
||||
elevation: 1,
|
||||
leading: showBackButton
|
||||
? IconButton(
|
||||
|
||||
@@ -58,7 +58,7 @@ typedef AttachmentThumbnailBuilder = Widget Function(
|
||||
|
||||
/// Builder function for building a mention tile.
|
||||
///
|
||||
/// Use [MentionTile] for the default implementation.
|
||||
/// Use [UserMentionTile] for the default implementation.
|
||||
@Deprecated(
|
||||
'Use `UserMentionTileBuilder` instead. Will be removed in future release',
|
||||
)
|
||||
|
||||
@@ -494,14 +494,18 @@ class _MessageListViewState extends State<MessageListView> {
|
||||
return _buildThreadSeparator();
|
||||
}
|
||||
if (i == itemCount - 3) {
|
||||
if (widget.headerBuilder == null) {
|
||||
if (widget.reverse
|
||||
? widget.headerBuilder == null
|
||||
: widget.footerBuilder == null) {
|
||||
if (_isThreadConversation) return const Offstage();
|
||||
return const SizedBox(height: 52);
|
||||
}
|
||||
return const SizedBox(height: 8);
|
||||
}
|
||||
if (i == 0) {
|
||||
if (widget.footerBuilder == null) {
|
||||
if (widget.reverse
|
||||
? widget.footerBuilder == null
|
||||
: widget.headerBuilder == null) {
|
||||
return const SizedBox(height: 30);
|
||||
}
|
||||
return const SizedBox(height: 8);
|
||||
@@ -525,13 +529,13 @@ class _MessageListViewState extends State<MessageListView> {
|
||||
? widget.dateDividerBuilder!(
|
||||
nextMessage.createdAt.toLocal(),
|
||||
)
|
||||
: DateDivider(
|
||||
dateTime: nextMessage.createdAt.toLocal(),
|
||||
: Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 12),
|
||||
child: DateDivider(
|
||||
dateTime: nextMessage.createdAt.toLocal(),
|
||||
),
|
||||
);
|
||||
return Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 12),
|
||||
child: divider,
|
||||
);
|
||||
return divider;
|
||||
}
|
||||
final timeDiff =
|
||||
Jiffy(nextMessage.createdAt.toLocal()).diff(
|
||||
@@ -560,8 +564,13 @@ class _MessageListViewState extends State<MessageListView> {
|
||||
}
|
||||
|
||||
if (i == itemCount - 2) {
|
||||
return widget.headerBuilder?.call(context) ??
|
||||
const Offstage();
|
||||
if (widget.reverse) {
|
||||
return widget.headerBuilder?.call(context) ??
|
||||
const Offstage();
|
||||
} else {
|
||||
return widget.footerBuilder?.call(context) ??
|
||||
const Offstage();
|
||||
}
|
||||
}
|
||||
|
||||
if (i == itemCount - 3) {
|
||||
@@ -579,8 +588,13 @@ class _MessageListViewState extends State<MessageListView> {
|
||||
}
|
||||
|
||||
if (i == 0) {
|
||||
return widget.footerBuilder?.call(context) ??
|
||||
const Offstage();
|
||||
if (widget.reverse) {
|
||||
return widget.footerBuilder?.call(context) ??
|
||||
const Offstage();
|
||||
} else {
|
||||
return widget.headerBuilder?.call(context) ??
|
||||
const Offstage();
|
||||
}
|
||||
}
|
||||
|
||||
const bottomMessageIndex = 2; // 1 -> loader // 0 -> footer
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import 'dart:ui';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:stream_chat_flutter/src/extension.dart';
|
||||
import 'package:stream_chat_flutter/src/reaction_bubble.dart';
|
||||
import 'package:stream_chat_flutter/src/reaction_picker.dart';
|
||||
import 'package:stream_chat_flutter/src/stream_chat.dart';
|
||||
@@ -8,7 +9,6 @@ import 'package:stream_chat_flutter/src/theme/themes.dart';
|
||||
import 'package:stream_chat_flutter/src/user_avatar.dart';
|
||||
import 'package:stream_chat_flutter/stream_chat_flutter.dart';
|
||||
import 'package:stream_chat_flutter_core/stream_chat_flutter_core.dart';
|
||||
import 'package:stream_chat_flutter/src/extension.dart';
|
||||
|
||||
/// Modal widget for displaying message reactions
|
||||
class MessageReactionsModal extends StatelessWidget {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:jiffy/jiffy.dart';
|
||||
import 'package:stream_chat_flutter/src/extension.dart';
|
||||
import 'package:stream_chat_flutter/stream_chat_flutter.dart';
|
||||
import 'package:stream_chat_flutter_core/stream_chat_flutter_core.dart';
|
||||
import 'package:stream_chat_flutter/src/extension.dart';
|
||||
|
||||
/// It shows the current [Message] preview.
|
||||
///
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:stream_chat_flutter/src/extension.dart';
|
||||
import 'package:stream_chat_flutter/src/info_tile.dart';
|
||||
import 'package:stream_chat_flutter/src/message_search_item.dart';
|
||||
import 'package:stream_chat_flutter/src/theme/themes.dart';
|
||||
import 'package:stream_chat_flutter/stream_chat_flutter.dart';
|
||||
import 'package:stream_chat_flutter_core/stream_chat_flutter_core.dart';
|
||||
import 'package:stream_chat_flutter/src/extension.dart';
|
||||
|
||||
/// Callback called when tapping on a user
|
||||
typedef MessageSearchItemTapCallback = void Function(GetMessageResponse);
|
||||
@@ -30,13 +30,13 @@ typedef EmptyMessageSearchBuilder = Widget Function(
|
||||
/// Widget build(BuildContext context) {
|
||||
/// return Scaffold(
|
||||
/// body: MessageSearchListView(
|
||||
/// messageQuery: _channelQuery,
|
||||
/// filters: {
|
||||
/// 'members': {
|
||||
/// r'$in': [user.id]
|
||||
/// }
|
||||
/// },
|
||||
/// paginationParams: PaginationParams(limit: 20),
|
||||
/// messageQuery: _channelQuery,
|
||||
/// filters: {
|
||||
/// 'members': {
|
||||
/// r'$in': [user.id]
|
||||
/// }
|
||||
/// },
|
||||
/// limit: 20,
|
||||
/// ),
|
||||
/// );
|
||||
/// }
|
||||
@@ -53,17 +53,12 @@ typedef EmptyMessageSearchBuilder = Widget Function(
|
||||
/// Modify it to change the widget appearance.
|
||||
class MessageSearchListView extends StatefulWidget {
|
||||
/// Instantiate a new MessageSearchListView
|
||||
MessageSearchListView({
|
||||
const MessageSearchListView({
|
||||
Key? key,
|
||||
required this.filters,
|
||||
this.messageQuery,
|
||||
this.sortOptions,
|
||||
@Deprecated(
|
||||
"'paginationParams' is deprecated and shouldn't be used. "
|
||||
"This property is no longer used, Please use 'limit' instead",
|
||||
)
|
||||
this.paginationParams,
|
||||
int? limit,
|
||||
this.limit = 30,
|
||||
this.messageFilters,
|
||||
this.separatorBuilder,
|
||||
this.itemBuilder,
|
||||
@@ -76,8 +71,7 @@ class MessageSearchListView extends StatefulWidget {
|
||||
this.loadingBuilder,
|
||||
this.childBuilder,
|
||||
this.messageSearchListController,
|
||||
}) : limit = limit ?? paginationParams?.limit ?? 30,
|
||||
super(key: key);
|
||||
}) : super(key: key);
|
||||
|
||||
/// Message String to search on
|
||||
final String? messageQuery;
|
||||
@@ -95,16 +89,6 @@ class MessageSearchListView extends StatefulWidget {
|
||||
/// Direction can be ascending or descending.
|
||||
final List<SortOption>? sortOptions;
|
||||
|
||||
/// Pagination parameters
|
||||
/// limit: the number of users to return (max is 30)
|
||||
/// offset: the offset (max is 1000)
|
||||
/// message_limit: how many messages should be included to each channel
|
||||
@Deprecated(
|
||||
"'paginationParams' is deprecated and shouldn't be used. "
|
||||
"This property is no longer used, Please use 'limit' instead",
|
||||
)
|
||||
final PaginationParams? paginationParams;
|
||||
|
||||
/// The amount of messages requested per API call.
|
||||
final int limit;
|
||||
|
||||
|
||||
@@ -100,7 +100,9 @@ class StreamChatState extends State<StreamChat> {
|
||||
return Theme(
|
||||
data: materialTheme.copyWith(
|
||||
primaryIconTheme: streamTheme.primaryIconTheme,
|
||||
accentColor: streamTheme.colorTheme.accentPrimary,
|
||||
colorScheme: materialTheme.colorScheme.copyWith(
|
||||
secondary: streamTheme.colorTheme.accentPrimary,
|
||||
),
|
||||
),
|
||||
child: StreamChatCore(
|
||||
client: client,
|
||||
|
||||
@@ -131,7 +131,7 @@ class StreamChatThemeData {
|
||||
final defaultTheme = StreamChatThemeData(brightness: theme.brightness);
|
||||
final customizedTheme = StreamChatThemeData.fromColorAndTextTheme(
|
||||
defaultTheme.colorTheme.copyWith(
|
||||
accentPrimary: theme.accentColor,
|
||||
accentPrimary: theme.colorScheme.secondary,
|
||||
),
|
||||
defaultTheme.textTheme,
|
||||
);
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:stream_chat_flutter/src/extension.dart';
|
||||
import 'package:stream_chat_flutter/src/stream_chat_theme.dart';
|
||||
import 'package:stream_chat_flutter/stream_chat_flutter.dart';
|
||||
import 'package:stream_chat_flutter_core/stream_chat_flutter_core.dart';
|
||||
import 'package:stream_chat_flutter/src/extension.dart';
|
||||
|
||||
/// 
|
||||
/// 
|
||||
@@ -127,10 +128,14 @@ class ThreadHeader extends StatelessWidget implements PreferredSizeWidget {
|
||||
],
|
||||
);
|
||||
|
||||
final theme = Theme.of(context);
|
||||
return AppBar(
|
||||
automaticallyImplyLeading: false,
|
||||
textTheme: Theme.of(context).textTheme,
|
||||
brightness: Theme.of(context).brightness,
|
||||
toolbarTextStyle: theme.textTheme.bodyText2,
|
||||
titleTextStyle: theme.textTheme.headline6,
|
||||
systemOverlayStyle: theme.brightness == Brightness.dark
|
||||
? SystemUiOverlayStyle.light
|
||||
: SystemUiOverlayStyle.dark,
|
||||
elevation: 1,
|
||||
leading: leading ??
|
||||
(showBackButton
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:lottie/lottie.dart';
|
||||
import 'package:stream_chat_flutter_core/stream_chat_flutter_core.dart';
|
||||
import 'package:stream_chat_flutter/src/extension.dart';
|
||||
import 'package:stream_chat_flutter_core/stream_chat_flutter_core.dart';
|
||||
|
||||
/// Widget to show the current list of typing users
|
||||
class TypingIndicator extends StatelessWidget {
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:jiffy/jiffy.dart';
|
||||
import 'package:stream_chat_flutter/src/extension.dart';
|
||||
import 'package:stream_chat_flutter/src/stream_svg_icon.dart';
|
||||
import 'package:stream_chat_flutter/src/user_list_view.dart';
|
||||
import 'package:stream_chat_flutter/stream_chat_flutter.dart';
|
||||
import 'package:stream_chat_flutter_core/stream_chat_flutter_core.dart';
|
||||
import 'package:stream_chat_flutter/src/extension.dart';
|
||||
|
||||
///
|
||||
/// It shows the current [User] preview.
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:stream_chat_flutter/src/extension.dart';
|
||||
import 'package:stream_chat_flutter/src/theme/themes.dart';
|
||||
import 'package:stream_chat_flutter/stream_chat_flutter.dart';
|
||||
import 'package:stream_chat_flutter_core/stream_chat_flutter_core.dart';
|
||||
import 'package:stream_chat_flutter/src/extension.dart';
|
||||
|
||||
/// Callback called when tapping on a user
|
||||
typedef UserTapCallback = void Function(User, Widget?);
|
||||
@@ -82,8 +82,7 @@ class UserListView extends StatefulWidget {
|
||||
/// The query filters to use.
|
||||
/// You can query on any of the custom fields you've defined on the [Channel].
|
||||
/// You can also filter other built-in channel fields.
|
||||
// TODO: Make it non-nullable in a future breaking release
|
||||
final Filter? filter;
|
||||
final Filter filter;
|
||||
|
||||
/// The sorting used for the channels matching the filters.
|
||||
/// Sorting is based on field and direction, multiple sorting options can
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:stream_chat_flutter/src/extension.dart';
|
||||
import 'package:stream_chat_flutter/src/stream_chat_theme.dart';
|
||||
import 'package:stream_chat_flutter/stream_chat_flutter.dart';
|
||||
import 'package:stream_chat_flutter/src/extension.dart';
|
||||
|
||||
/// Widget for displaying a footnote
|
||||
class VisibleFootnote extends StatelessWidget {
|
||||
|
||||
@@ -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: 2.2.1
|
||||
version: 3.0.0
|
||||
repository: https://github.com/GetStream/stream-chat-flutter
|
||||
issue_tracker: https://github.com/GetStream/stream-chat-flutter/issues
|
||||
|
||||
@@ -37,7 +37,7 @@ dependencies:
|
||||
scrollable_positioned_list: ^0.2.0-nullsafety.0
|
||||
share_plus: ^2.0.3
|
||||
shimmer: ^2.0.0
|
||||
stream_chat_flutter_core: ^2.2.1
|
||||
stream_chat_flutter_core: ^3.0.0
|
||||
substring_highlight: ^1.0.26
|
||||
synchronized: ^3.0.0
|
||||
url_launcher: ^6.0.3
|
||||
|
||||
@@ -0,0 +1,79 @@
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:stream_chat_flutter/src/emoji/emoji.dart';
|
||||
|
||||
void main() {
|
||||
group('src/emoji', () {
|
||||
test('${Emoji.byShortName} should bring the correct emoji', () {
|
||||
final resultEmoji = Emoji.byShortName('smiley');
|
||||
expect(resultEmoji, _mockEmoji);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
final _mockEmoji = Emoji(
|
||||
name: 'grinning face with big eyes',
|
||||
char: '\u{1F603}',
|
||||
shortName: 'smiley',
|
||||
emojiGroup: EmojiGroup.smileysEmotion,
|
||||
emojiSubgroup: EmojiSubgroup.faceSmiling,
|
||||
keywords: [
|
||||
'face',
|
||||
'mouth',
|
||||
'open',
|
||||
'smile',
|
||||
'uc6',
|
||||
'smiley',
|
||||
'happy',
|
||||
'silly',
|
||||
'laugh',
|
||||
'good',
|
||||
'smile',
|
||||
'teeth',
|
||||
'fun',
|
||||
'smileys',
|
||||
'mood',
|
||||
'emotion',
|
||||
'emotions',
|
||||
'emotional',
|
||||
'hooray',
|
||||
'cheek',
|
||||
'cheeky',
|
||||
'excited',
|
||||
'feliz',
|
||||
'heureux',
|
||||
'cheerful',
|
||||
'delighted',
|
||||
'ecstatic',
|
||||
'elated',
|
||||
'glad',
|
||||
'joy',
|
||||
'merry',
|
||||
'funny',
|
||||
'laughing',
|
||||
'lol',
|
||||
'rofl',
|
||||
'lmao',
|
||||
'lmfao',
|
||||
'hilarious',
|
||||
'ha',
|
||||
'haha',
|
||||
'chuckle',
|
||||
'comedy',
|
||||
'giggle',
|
||||
'hehe',
|
||||
'joyful',
|
||||
'laugh out loud',
|
||||
'rire',
|
||||
'tee hee',
|
||||
'jaja',
|
||||
'good job',
|
||||
'nice',
|
||||
'well done',
|
||||
'bravo',
|
||||
'congratulations',
|
||||
'congrats',
|
||||
'smiles',
|
||||
'dentist',
|
||||
':-D',
|
||||
'=D'
|
||||
]);
|
||||
@@ -9,7 +9,6 @@ void main() {
|
||||
final thierry = User(id: 'thierry', name: 'Thierry');
|
||||
final users = [tommaso, thierry];
|
||||
|
||||
final a = users.search('Tom');
|
||||
expect(users.search('Tom'), [tommaso]);
|
||||
expect(users.search('Thier'), [thierry]);
|
||||
});
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import 'package:flutter/material.dart' hide TextTheme;
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:stream_chat_flutter/stream_chat_flutter.dart';
|
||||
import 'package:mocktail/mocktail.dart';
|
||||
import 'package:stream_chat_flutter/stream_chat_flutter.dart';
|
||||
|
||||
class MockStreamChatClient extends Mock implements StreamChatClient {}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:stream_chat_flutter/stream_chat_flutter.dart';
|
||||
import 'package:mocktail/mocktail.dart';
|
||||
import 'package:stream_chat_flutter/stream_chat_flutter.dart';
|
||||
|
||||
class MockStreamChatClient extends Mock implements StreamChatClient {}
|
||||
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
## Upcoming
|
||||
## 3.0.0
|
||||
|
||||
⚠️ Deprecated
|
||||
- Updated `stream_chat` dependency to [`3.0.0`](https://pub.dev/packages/stream_chat/changelog).
|
||||
|
||||
🛑️ Breaking Changes from `2.2.1`
|
||||
|
||||
- `MessageSearchListViewCore` `paginationParams` property is now deprecated in favor of `limit`.
|
||||
```dart
|
||||
@@ -10,7 +12,7 @@
|
||||
// new
|
||||
limit = 30
|
||||
```
|
||||
- `UserListViewCore` `pagination` property is now deprecated in favor of `limit`.
|
||||
- `UserListCore` `pagination` property is now deprecated in favor of `limit`.
|
||||
```dart
|
||||
// previous
|
||||
pagination = const PaginationParams(limit: 30)
|
||||
@@ -18,7 +20,7 @@
|
||||
// new
|
||||
limit = 30
|
||||
```
|
||||
- `ChannelListViewCore` `pagination` property is now deprecated in favor of `limit`.
|
||||
- `ChannelListCore` `pagination` property is now deprecated in favor of `limit`.
|
||||
```dart
|
||||
// previous
|
||||
pagination = const PaginationParams(limit: 30)
|
||||
@@ -27,9 +29,11 @@
|
||||
limit = 30
|
||||
```
|
||||
|
||||
- `UserListCore` `filter` property now is non-nullable.
|
||||
|
||||
🔄 Changed
|
||||
|
||||
- `UserListViewCore` filter property now has a default value.
|
||||
- `UserListCore` filter property now has a default value.
|
||||
```dart
|
||||
filter = const Filter.empty()
|
||||
```
|
||||
|
||||
@@ -56,7 +56,7 @@ import 'package:stream_chat_flutter_core/src/typedef.dart';
|
||||
/// information about the channels.
|
||||
class ChannelListCore extends StatefulWidget {
|
||||
/// Instantiate a new ChannelListView
|
||||
ChannelListCore({
|
||||
const ChannelListCore({
|
||||
Key? key,
|
||||
required this.errorBuilder,
|
||||
required this.emptyBuilder,
|
||||
@@ -69,15 +69,9 @@ class ChannelListCore extends StatefulWidget {
|
||||
this.memberLimit,
|
||||
this.messageLimit,
|
||||
this.sort,
|
||||
@Deprecated(
|
||||
"'pagination' is deprecated and shouldn't be used. "
|
||||
"This property is no longer used, Please use 'limit' instead",
|
||||
)
|
||||
this.pagination,
|
||||
this.channelListController,
|
||||
int? limit,
|
||||
}) : limit = limit ?? pagination?.limit ?? 25,
|
||||
super(key: key);
|
||||
this.limit = 25,
|
||||
}) : super(key: key);
|
||||
|
||||
/// A [ChannelListController] allows reloading and pagination.
|
||||
/// Use [ChannelListController.loadData] and
|
||||
@@ -124,16 +118,6 @@ class ChannelListCore extends StatefulWidget {
|
||||
/// Number of messages to fetch in each channel
|
||||
final int? messageLimit;
|
||||
|
||||
/// Pagination parameters
|
||||
/// limit: the number of channels to return (max is 30)
|
||||
/// offset: the offset (max is 1000)
|
||||
/// message_limit: how many messages should be included to each channel
|
||||
@Deprecated(
|
||||
"'pagination' is deprecated and shouldn't be used. "
|
||||
"This property is no longer used, Please use 'limit' instead",
|
||||
)
|
||||
final PaginationParams? pagination;
|
||||
|
||||
/// The amount of channels requested per API call.
|
||||
final int limit;
|
||||
|
||||
|
||||
@@ -18,9 +18,9 @@ import 'package:stream_chat_flutter_core/src/typedef.dart';
|
||||
/// Widget build(BuildContext context) {
|
||||
/// return Scaffold(
|
||||
/// body: MessageSearchListCore(
|
||||
/// messageQuery: _messageFilter,
|
||||
/// filters: _channelsFilter,
|
||||
/// paginationParams: PaginationParams(limit: 20),
|
||||
/// messageQuery: _messageFilter,
|
||||
/// filters: _channelsFilter,
|
||||
/// limit: 20,
|
||||
/// ),
|
||||
/// );
|
||||
/// }
|
||||
|
||||
@@ -57,7 +57,7 @@ import 'package:stream_chat_flutter_core/stream_chat_flutter_core.dart';
|
||||
/// [errorBuilder] must all be supplied and not null.
|
||||
class UserListCore extends StatefulWidget {
|
||||
/// Instantiate a new [UserListCore]
|
||||
UserListCore({
|
||||
const UserListCore({
|
||||
required this.errorBuilder,
|
||||
required this.emptyBuilder,
|
||||
required this.loadingBuilder,
|
||||
@@ -66,16 +66,10 @@ class UserListCore extends StatefulWidget {
|
||||
this.filter = const Filter.empty(),
|
||||
this.sort,
|
||||
this.presence,
|
||||
@Deprecated(
|
||||
"'pagination' is deprecated and shouldn't be used. "
|
||||
"This property is no longer used, Please use 'limit' instead",
|
||||
)
|
||||
this.pagination,
|
||||
this.groupAlphabetically = false,
|
||||
this.userListController,
|
||||
int? limit,
|
||||
}) : limit = limit ?? pagination?.limit ?? 30,
|
||||
super(key: key);
|
||||
this.limit = 30,
|
||||
}) : super(key: key);
|
||||
|
||||
/// A [UserListController] allows reloading and pagination.
|
||||
/// Use [UserListController.loadData] and [UserListController.paginateData]
|
||||
@@ -97,8 +91,7 @@ class UserListCore extends StatefulWidget {
|
||||
/// The query filters to use.
|
||||
/// You can query on any of the custom fields you've defined on the [Channel].
|
||||
/// You can also filter other built-in channel fields.
|
||||
// TODO: Make it non-nullable in a future breaking release
|
||||
final Filter? filter;
|
||||
final Filter filter;
|
||||
|
||||
/// The sorting used for the channels matching the filters.
|
||||
/// Sorting is based on field and direction, multiple sorting options can be
|
||||
@@ -109,16 +102,6 @@ class UserListCore extends StatefulWidget {
|
||||
/// If true you’ll receive user presence updates via the websocket events
|
||||
final bool? presence;
|
||||
|
||||
/// Pagination parameters
|
||||
/// limit: the number of users to return (max is 30)
|
||||
/// offset: the offset (max is 1000)
|
||||
/// message_limit: how many messages should be included to each channel
|
||||
@Deprecated(
|
||||
"'pagination' is deprecated and shouldn't be used. "
|
||||
"This property is no longer used, Please use 'limit' instead",
|
||||
)
|
||||
final PaginationParams? pagination;
|
||||
|
||||
/// The amount of users requested per API call.
|
||||
final int limit;
|
||||
|
||||
|
||||
@@ -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: 2.2.1
|
||||
version: 3.0.0
|
||||
repository: https://github.com/GetStream/stream-chat-flutter
|
||||
issue_tracker: https://github.com/GetStream/stream-chat-flutter/issues
|
||||
|
||||
@@ -16,7 +16,7 @@ dependencies:
|
||||
sdk: flutter
|
||||
meta: ^1.3.0
|
||||
rxdart: ^0.27.0
|
||||
stream_chat: ^2.2.1
|
||||
stream_chat: ^3.0.0
|
||||
|
||||
dev_dependencies:
|
||||
fake_async: ^1.2.0
|
||||
|
||||
@@ -129,7 +129,7 @@ void main() {
|
||||
emptyBuilder: (BuildContext context) => const Offstage(),
|
||||
errorBuilder: (BuildContext context, Object error) =>
|
||||
Container(key: errorWidgetKey),
|
||||
pagination: pagination,
|
||||
limit: pagination.limit,
|
||||
);
|
||||
|
||||
final mockClient = MockClient();
|
||||
@@ -186,7 +186,7 @@ void main() {
|
||||
loadingBuilder: (BuildContext context) => const Offstage(),
|
||||
emptyBuilder: (BuildContext context) => Container(key: emptyWidgetKey),
|
||||
errorBuilder: (BuildContext context, Object error) => const Offstage(),
|
||||
pagination: pagination,
|
||||
limit: pagination.limit,
|
||||
);
|
||||
|
||||
final mockClient = MockClient();
|
||||
@@ -243,7 +243,7 @@ void main() {
|
||||
loadingBuilder: (BuildContext context) => const Offstage(),
|
||||
emptyBuilder: (BuildContext context) => const Offstage(),
|
||||
errorBuilder: (BuildContext context, Object error) => const Offstage(),
|
||||
pagination: pagination,
|
||||
limit: pagination.limit,
|
||||
);
|
||||
|
||||
final mockClient = MockClient();
|
||||
@@ -306,7 +306,7 @@ void main() {
|
||||
loadingBuilder: (BuildContext context) => const Offstage(),
|
||||
emptyBuilder: (BuildContext context) => const Offstage(),
|
||||
errorBuilder: (BuildContext context, Object error) => const Offstage(),
|
||||
pagination: pagination,
|
||||
limit: pagination.limit,
|
||||
);
|
||||
|
||||
final mockClient = MockClient();
|
||||
@@ -420,7 +420,7 @@ void main() {
|
||||
emptyBuilder: (BuildContext context) => const Offstage(),
|
||||
errorBuilder: (BuildContext context, Object error) =>
|
||||
const Offstage(),
|
||||
pagination: pagination.copyWith(limit: limit),
|
||||
limit: limit,
|
||||
);
|
||||
|
||||
final mockClient = MockClient();
|
||||
@@ -516,7 +516,7 @@ void main() {
|
||||
loadingBuilder: (BuildContext context) => const Offstage(),
|
||||
emptyBuilder: (BuildContext context) => const Offstage(),
|
||||
errorBuilder: (BuildContext context, Object error) => const Offstage(),
|
||||
pagination: pagination,
|
||||
limit: pagination.limit,
|
||||
);
|
||||
|
||||
expect(channelListCore.limit, pagination.limit);
|
||||
|
||||
@@ -334,7 +334,7 @@ void main() {
|
||||
loadingBuilder: (BuildContext context) => const Offstage(),
|
||||
emptyBuilder: (BuildContext context) => const Offstage(),
|
||||
errorBuilder: (BuildContext context, Object error) => const Offstage(),
|
||||
paginationParams: pagination,
|
||||
limit: pagination.limit,
|
||||
filters: testFilter,
|
||||
messageFilters: testMessageFilter,
|
||||
);
|
||||
@@ -457,7 +457,7 @@ void main() {
|
||||
emptyBuilder: (BuildContext context) => const Offstage(),
|
||||
errorBuilder: (BuildContext context, Object error) =>
|
||||
const Offstage(),
|
||||
paginationParams: pagination.copyWith(limit: limit),
|
||||
limit: limit,
|
||||
filters: testFilter,
|
||||
messageFilters: testMessageFilter,
|
||||
);
|
||||
@@ -561,7 +561,7 @@ void main() {
|
||||
errorBuilder: (BuildContext context, Object? error) => const Offstage(),
|
||||
filters: testFilter,
|
||||
messageFilters: testMessageFilter,
|
||||
paginationParams: pagination,
|
||||
limit: pagination.limit,
|
||||
);
|
||||
|
||||
expect(messageSearchListCore.limit, pagination.limit);
|
||||
|
||||
@@ -341,7 +341,7 @@ void main() {
|
||||
loadingBuilder: (BuildContext context) => const Offstage(),
|
||||
emptyBuilder: (BuildContext context) => const Offstage(),
|
||||
errorBuilder: (BuildContext context, Object error) => const Offstage(),
|
||||
pagination: pagination,
|
||||
limit: pagination.limit,
|
||||
groupAlphabetically: true,
|
||||
);
|
||||
|
||||
@@ -447,7 +447,7 @@ void main() {
|
||||
emptyBuilder: (BuildContext context) => const Offstage(),
|
||||
errorBuilder: (BuildContext context, Object error) =>
|
||||
const Offstage(),
|
||||
pagination: pagination.copyWith(limit: limit),
|
||||
limit: limit,
|
||||
groupAlphabetically: true,
|
||||
);
|
||||
|
||||
@@ -522,15 +522,15 @@ void main() {
|
||||
);
|
||||
|
||||
test('`widget.limit` should match `widget.pagination.limit`', () {
|
||||
const pagination = PaginationParams(limit: 30);
|
||||
const limit = 20;
|
||||
final userListCore = UserListCore(
|
||||
listBuilder: (_, __) => const Offstage(),
|
||||
loadingBuilder: (BuildContext context) => const Offstage(),
|
||||
emptyBuilder: (BuildContext context) => const Offstage(),
|
||||
errorBuilder: (BuildContext context, Object error) => const Offstage(),
|
||||
pagination: pagination,
|
||||
limit: limit,
|
||||
);
|
||||
|
||||
expect(userListCore.limit, pagination.limit);
|
||||
expect(userListCore.limit, limit);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
## Upcoming
|
||||
## 2.0.0
|
||||
|
||||
- Updated `stream_chat_flutter` dependency to [`3.0.0`](https://pub.dev/packages/stream_chat_flutter/changelog).
|
||||
|
||||
🐞 Fixed
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
name: stream_chat_localizations
|
||||
description: The Official localizations for Stream Chat Flutter, a service for building chat applications
|
||||
version: 1.1.0
|
||||
version: 2.0.0
|
||||
homepage: https://github.com/GetStream/stream-chat-flutter
|
||||
repository: https://github.com/GetStream/stream-chat-flutter
|
||||
issue_tracker: https://github.com/GetStream/stream-chat-flutter/issues
|
||||
@@ -14,7 +14,7 @@ dependencies:
|
||||
sdk: flutter
|
||||
flutter_localizations:
|
||||
sdk: flutter
|
||||
stream_chat_flutter: ^2.2.0
|
||||
stream_chat_flutter: ^3.0.0
|
||||
|
||||
dev_dependencies:
|
||||
flutter_test:
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:stream_chat_flutter/stream_chat_flutter.dart';
|
||||
import 'package:stream_chat_localizations/src/stream_chat_localizations.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
|
||||
class FooStreamChatLocalizations extends StreamChatLocalizationsEn {
|
||||
FooStreamChatLocalizations(
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
## Upcoming
|
||||
## 3.0.0
|
||||
|
||||
- Updated `stream_chat` dependency to [`3.0.0`](https://pub.dev/packages/stream_chat/changelog).
|
||||
- [[#604]](https://github.com/GetStream/stream-chat-flutter/issues/604) Fix cascade deletion by
|
||||
enabling `pragma foreign_keys`.
|
||||
- Added a new table `PinnedMessageReactions` and dao `PinnedMessageReactionDao` specifically for pinned messages.
|
||||
- Updated `stream_chat`: `^2.2.0` -> `TODO`
|
||||
|
||||
## 2.2.0
|
||||
|
||||
|
||||
@@ -7,11 +7,10 @@ import 'package:moor/isolate.dart';
|
||||
import 'package:moor/moor.dart';
|
||||
import 'package:path/path.dart';
|
||||
import 'package:path_provider/path_provider.dart';
|
||||
import 'package:stream_chat_persistence/src/db/moor_chat_database.dart';
|
||||
import 'package:stream_chat_persistence/src/stream_chat_persistence_client.dart';
|
||||
import 'package:stream_chat_persistence/stream_chat_persistence.dart';
|
||||
|
||||
import 'package:stream_chat_persistence/src/db/moor_chat_database.dart';
|
||||
|
||||
/// A Helper class to construct new instances of [MoorChatDatabase] specifically
|
||||
/// for native platform applications
|
||||
class SharedDB {
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
// coverage:ignore-file
|
||||
import 'package:moor/moor_web.dart';
|
||||
import 'package:stream_chat_persistence/src/stream_chat_persistence_client.dart';
|
||||
|
||||
import 'package:stream_chat_persistence/src/db/moor_chat_database.dart';
|
||||
import 'package:stream_chat_persistence/src/stream_chat_persistence_client.dart';
|
||||
|
||||
/// A Helper class to construct new instances of [MoorChatDatabase] specifically
|
||||
/// for Web applications
|
||||
|
||||
@@ -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: 2.2.0
|
||||
version: 3.0.0
|
||||
repository: https://github.com/GetStream/stream-chat-flutter
|
||||
issue_tracker: https://github.com/GetStream/stream-chat-flutter/issues
|
||||
|
||||
@@ -18,7 +18,7 @@ dependencies:
|
||||
path: ^1.8.0
|
||||
path_provider: ^2.0.1
|
||||
sqlite3_flutter_libs: ^0.5.0
|
||||
stream_chat: ^2.2.0
|
||||
stream_chat: ^3.0.0
|
||||
|
||||
dev_dependencies:
|
||||
build_runner: ^2.0.1
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:test/test.dart';
|
||||
import 'package:stream_chat_persistence/src/converter/list_converter.dart';
|
||||
import 'package:test/test.dart';
|
||||
|
||||
void main() {
|
||||
group('mapToDart', () {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:test/test.dart';
|
||||
import 'package:stream_chat_persistence/src/converter/map_converter.dart';
|
||||
import 'package:test/test.dart';
|
||||
|
||||
void main() {
|
||||
group('mapToDart', () {
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
import 'package:test/test.dart';
|
||||
import 'package:stream_chat/stream_chat.dart';
|
||||
import 'package:stream_chat_persistence/src/converter/message_sending_status_converter.dart';
|
||||
import 'package:test/test.dart';
|
||||
|
||||
void main() {
|
||||
group('mapToDart', () {
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import 'dart:math' as math;
|
||||
|
||||
import 'package:stream_chat/stream_chat.dart';
|
||||
import 'package:stream_chat_persistence/src/dao/dao.dart';
|
||||
import 'package:stream_chat_persistence/src/db/moor_chat_database.dart';
|
||||
import 'package:test/test.dart';
|
||||
import 'package:stream_chat/stream_chat.dart';
|
||||
|
||||
import '../../stream_chat_persistence_client_test.dart';
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import 'package:test/test.dart';
|
||||
import 'package:moor/ffi.dart';
|
||||
import 'package:moor/isolate.dart';
|
||||
import 'package:moor/moor.dart' hide isNotNull;
|
||||
import 'package:stream_chat_persistence/src/db/moor_chat_database.dart';
|
||||
import 'package:test/test.dart';
|
||||
|
||||
DatabaseConnection _backgroundConnection() =>
|
||||
DatabaseConnection.fromExecutor(VmDatabase.memory());
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
import 'dart:math' as math;
|
||||
|
||||
import 'package:test/test.dart';
|
||||
import 'package:stream_chat/stream_chat.dart';
|
||||
import 'package:stream_chat_persistence/src/db/moor_chat_database.dart';
|
||||
import 'package:stream_chat_persistence/src/mapper/channel_mapper.dart';
|
||||
import 'package:test/test.dart';
|
||||
|
||||
import '../utils/date_matcher.dart';
|
||||
|
||||
void main() {
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import 'dart:math' as math;
|
||||
|
||||
import 'package:test/test.dart';
|
||||
import 'package:stream_chat/stream_chat.dart';
|
||||
import 'package:stream_chat_persistence/src/db/moor_chat_database.dart';
|
||||
import 'package:stream_chat_persistence/src/mapper/member_mapper.dart';
|
||||
import 'package:test/test.dart';
|
||||
|
||||
import '../utils/date_matcher.dart';
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import 'dart:convert';
|
||||
import 'dart:math' as math;
|
||||
|
||||
import 'package:test/test.dart';
|
||||
import 'package:stream_chat/stream_chat.dart';
|
||||
import 'package:stream_chat_persistence/src/db/moor_chat_database.dart';
|
||||
import 'package:stream_chat_persistence/src/mapper/message_mapper.dart';
|
||||
import 'package:test/test.dart';
|
||||
|
||||
import '../utils/date_matcher.dart';
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import 'dart:convert';
|
||||
import 'dart:math' as math;
|
||||
|
||||
import 'package:test/test.dart';
|
||||
import 'package:stream_chat/stream_chat.dart';
|
||||
import 'package:stream_chat_persistence/src/db/moor_chat_database.dart';
|
||||
import 'package:stream_chat_persistence/src/mapper/pinned_message_mapper.dart';
|
||||
import 'package:test/test.dart';
|
||||
|
||||
import '../utils/date_matcher.dart';
|
||||
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
import 'package:test/test.dart';
|
||||
import 'package:stream_chat/stream_chat.dart';
|
||||
import 'package:stream_chat_persistence/src/db/moor_chat_database.dart';
|
||||
import 'package:stream_chat_persistence/src/mapper/pinned_message_reaction_mapper.dart';
|
||||
import 'package:test/test.dart';
|
||||
|
||||
import '../utils/date_matcher.dart';
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import 'package:test/test.dart';
|
||||
import 'package:stream_chat/stream_chat.dart';
|
||||
import 'package:stream_chat_persistence/src/db/moor_chat_database.dart';
|
||||
import 'package:stream_chat_persistence/src/mapper/reaction_mapper.dart';
|
||||
import 'package:test/test.dart';
|
||||
|
||||
import '../utils/date_matcher.dart';
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import 'package:test/test.dart';
|
||||
import 'package:stream_chat/stream_chat.dart';
|
||||
import 'package:stream_chat_persistence/src/db/moor_chat_database.dart';
|
||||
import 'package:stream_chat_persistence/src/mapper/read_mapper.dart';
|
||||
import 'package:test/test.dart';
|
||||
|
||||
import '../utils/date_matcher.dart';
|
||||
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
import 'dart:math' as math;
|
||||
import 'package:test/test.dart';
|
||||
|
||||
import 'package:stream_chat/stream_chat.dart';
|
||||
import 'package:stream_chat_persistence/src/db/moor_chat_database.dart';
|
||||
import 'package:stream_chat_persistence/src/mapper/user_mapper.dart';
|
||||
import 'package:test/test.dart';
|
||||
|
||||
import '../utils/date_matcher.dart';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user