chore(ui,core,llc,persistance,localization): remove analysis warnings due to flutter 2.5
This commit is contained in:
@@ -143,9 +143,6 @@ class StreamChatClient {
|
|||||||
|
|
||||||
late final RetryPolicy _retryPolicy;
|
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
|
/// the last dateTime at the which all the channels were synced
|
||||||
DateTime? _lastSyncedAt;
|
DateTime? _lastSyncedAt;
|
||||||
|
|
||||||
@@ -434,8 +431,6 @@ class StreamChatClient {
|
|||||||
type: EventType.connectionRecovered,
|
type: EventType.connectionRecovered,
|
||||||
online: true,
|
online: true,
|
||||||
));
|
));
|
||||||
} else {
|
|
||||||
_synced = false;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -460,13 +455,11 @@ class StreamChatClient {
|
|||||||
Future<void> sync({List<String>? cids, DateTime? lastSyncAt}) async {
|
Future<void> sync({List<String>? cids, DateTime? lastSyncAt}) async {
|
||||||
cids ??= await _chatPersistenceClient?.getChannelCids();
|
cids ??= await _chatPersistenceClient?.getChannelCids();
|
||||||
if (cids == null || cids.isEmpty) {
|
if (cids == null || cids.isEmpty) {
|
||||||
_synced = true;
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
lastSyncAt ??= await _chatPersistenceClient?.getLastSyncAt();
|
lastSyncAt ??= await _chatPersistenceClient?.getLastSyncAt();
|
||||||
if (lastSyncAt == null) {
|
if (lastSyncAt == null) {
|
||||||
_synced = true;
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -484,12 +477,10 @@ class StreamChatClient {
|
|||||||
handleEvent(event);
|
handleEvent(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
_synced = true;
|
|
||||||
final now = DateTime.now();
|
final now = DateTime.now();
|
||||||
_lastSyncedAt = now;
|
_lastSyncedAt = now;
|
||||||
_chatPersistenceClient?.updateLastSyncAt(now);
|
_chatPersistenceClient?.updateLastSyncAt(now);
|
||||||
} catch (e, stk) {
|
} catch (e, stk) {
|
||||||
_synced = false;
|
|
||||||
logger.severe('Error during sync', e, stk);
|
logger.severe('Error during sync', e, stk);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,8 +6,8 @@ import 'package:rxdart/rxdart.dart';
|
|||||||
import 'package:stream_chat/src/client/channel.dart';
|
import 'package:stream_chat/src/client/channel.dart';
|
||||||
import 'package:stream_chat/src/client/retry_policy.dart';
|
import 'package:stream_chat/src/client/retry_policy.dart';
|
||||||
import 'package:stream_chat/src/core/error/error.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/core/models/message.dart';
|
||||||
|
import 'package:stream_chat/src/event_type.dart';
|
||||||
import 'package:stream_chat/stream_chat.dart';
|
import 'package:stream_chat/stream_chat.dart';
|
||||||
|
|
||||||
/// The retry queue associated to a channel
|
/// The retry queue associated to a channel
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import 'package:json_annotation/json_annotation.dart';
|
import 'package:json_annotation/json_annotation.dart';
|
||||||
import 'package:stream_chat/src/core/models/channel_config.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/models/user.dart';
|
||||||
|
import 'package:stream_chat/src/core/util/serializer.dart';
|
||||||
|
|
||||||
part 'channel_model.g.dart';
|
part 'channel_model.g.dart';
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import 'package:json_annotation/json_annotation.dart';
|
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/models/user.dart';
|
||||||
|
import 'package:stream_chat/src/core/util/serializer.dart';
|
||||||
|
|
||||||
part 'reaction.g.dart';
|
part 'reaction.g.dart';
|
||||||
|
|
||||||
|
|||||||
@@ -6,15 +6,15 @@ import 'package:logging/logging.dart';
|
|||||||
import 'package:meta/meta.dart';
|
import 'package:meta/meta.dart';
|
||||||
import 'package:rxdart/rxdart.dart';
|
import 'package:rxdart/rxdart.dart';
|
||||||
import 'package:stream_chat/src/core/error/error.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.dart';
|
||||||
import 'package:stream_chat/src/core/http/token_manager.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/event.dart';
|
||||||
import 'package:stream_chat/src/core/models/user.dart';
|
import 'package:stream_chat/src/core/models/user.dart';
|
||||||
import 'package:stream_chat/src/event_type.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: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/status.dart' as status;
|
||||||
|
import 'package:web_socket_channel/web_socket_channel.dart';
|
||||||
|
|
||||||
/// Typedef which exposes an [Event] as the only parameter.
|
/// Typedef which exposes an [Event] as the only parameter.
|
||||||
typedef EventHandler = void Function(Event);
|
typedef EventHandler = void Function(Event);
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
|
|
||||||
import 'package:test/test.dart';
|
|
||||||
import 'package:stream_chat/src/core/api/responses.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/device.dart';
|
||||||
import 'package:stream_chat/src/core/models/member.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/reaction.dart';
|
||||||
import 'package:stream_chat/src/core/models/read.dart';
|
import 'package:stream_chat/src/core/models/read.dart';
|
||||||
import 'package:stream_chat/stream_chat.dart';
|
import 'package:stream_chat/stream_chat.dart';
|
||||||
|
import 'package:test/test.dart';
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
group('src/api/responses', () {
|
group('src/api/responses', () {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
|
|
||||||
import 'package:test/test.dart';
|
|
||||||
import 'package:stream_chat/src/core/models/filter.dart';
|
import 'package:stream_chat/src/core/models/filter.dart';
|
||||||
|
import 'package:test/test.dart';
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
group('operators', () {
|
group('operators', () {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import 'package:test/test.dart';
|
|
||||||
import 'package:stream_chat/src/core/util/serializer.dart';
|
import 'package:stream_chat/src/core/util/serializer.dart';
|
||||||
|
import 'package:test/test.dart';
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
group('src/models/serialization', () {
|
group('src/models/serialization', () {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import 'package:test/test.dart';
|
|
||||||
import 'package:stream_chat/src/core/util/extension.dart';
|
import 'package:stream_chat/src/core/util/extension.dart';
|
||||||
|
import 'package:test/test.dart';
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
test('`.withNullifyer` converts the type into non-nullable', () {
|
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/channel_api.dart';
|
||||||
import 'package:stream_chat/src/core/api/device_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/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/message_api.dart';
|
||||||
import 'package:stream_chat/src/core/api/moderation_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/stream_chat_api.dart';
|
||||||
import 'package:stream_chat/src/core/api/user_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.dart';
|
||||||
import 'package:stream_chat/src/core/http/token_manager.dart';
|
import 'package:stream_chat/src/core/http/token_manager.dart';
|
||||||
import 'package:stream_chat/src/ws/websocket.dart';
|
import 'package:stream_chat/src/ws/websocket.dart';
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
|
|
||||||
|
import 'package:mocktail/mocktail.dart';
|
||||||
import 'package:stream_chat/src/core/http/token_manager.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:stream_chat/stream_chat.dart';
|
||||||
import 'package:test/test.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 'package:web_socket_channel/web_socket_channel.dart';
|
||||||
|
|
||||||
import '../fakes.dart';
|
import '../fakes.dart';
|
||||||
|
|||||||
@@ -106,9 +106,7 @@ class ChannelListPage extends StatelessWidget {
|
|||||||
[StreamChat.of(context).currentUser!.id],
|
[StreamChat.of(context).currentUser!.id],
|
||||||
),
|
),
|
||||||
sort: const [SortOption('last_message_at')],
|
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],
|
[StreamChat.of(context).currentUser!.id],
|
||||||
),
|
),
|
||||||
sort: const [SortOption('last_message_at')],
|
sort: const [SortOption('last_message_at')],
|
||||||
pagination: const PaginationParams(
|
limit: 20,
|
||||||
limit: 20,
|
|
||||||
),
|
|
||||||
channelWidget: const ChannelPage(),
|
channelWidget: const ChannelPage(),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -85,9 +85,7 @@ class ChannelListPage extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
channelPreviewBuilder: _channelPreviewBuilder,
|
channelPreviewBuilder: _channelPreviewBuilder,
|
||||||
// sort: [SortOption('last_message_at')],
|
// sort: [SortOption('last_message_at')],
|
||||||
pagination: const PaginationParams(
|
limit: 20,
|
||||||
limit: 20,
|
|
||||||
),
|
|
||||||
channelWidget: const ChannelPage(),
|
channelWidget: const ChannelPage(),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -69,9 +69,7 @@ class ChannelListPage extends StatelessWidget {
|
|||||||
[StreamChat.of(context).currentUser!.id],
|
[StreamChat.of(context).currentUser!.id],
|
||||||
),
|
),
|
||||||
sort: const [SortOption('last_message_at')],
|
sort: const [SortOption('last_message_at')],
|
||||||
pagination: const PaginationParams(
|
limit: 20,
|
||||||
limit: 20,
|
|
||||||
),
|
|
||||||
channelWidget: const ChannelPage(),
|
channelWidget: const ChannelPage(),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -75,9 +75,7 @@ class ChannelListPage extends StatelessWidget {
|
|||||||
[StreamChat.of(context).currentUser!.id],
|
[StreamChat.of(context).currentUser!.id],
|
||||||
),
|
),
|
||||||
sort: const [SortOption('last_message_at')],
|
sort: const [SortOption('last_message_at')],
|
||||||
pagination: const PaginationParams(
|
limit: 20,
|
||||||
limit: 20,
|
|
||||||
),
|
|
||||||
channelWidget: const ChannelPage(),
|
channelWidget: const ChannelPage(),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -102,9 +102,7 @@ class ChannelListPage extends StatelessWidget {
|
|||||||
[StreamChat.of(context).currentUser!.id],
|
[StreamChat.of(context).currentUser!.id],
|
||||||
),
|
),
|
||||||
sort: const [SortOption('last_message_at')],
|
sort: const [SortOption('last_message_at')],
|
||||||
pagination: const PaginationParams(
|
limit: 20,
|
||||||
limit: 20,
|
|
||||||
),
|
|
||||||
channelWidget: const ChannelPage(),
|
channelWidget: const ChannelPage(),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
import 'package:flutter/material.dart';
|
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/src/upload_progress_indicator.dart';
|
||||||
import 'package:stream_chat_flutter/stream_chat_flutter.dart';
|
import 'package:stream_chat_flutter/stream_chat_flutter.dart';
|
||||||
import 'package:stream_chat_flutter/src/extension.dart';
|
|
||||||
|
|
||||||
/// Widget to build in progress
|
/// Widget to build in progress
|
||||||
typedef InProgressBuilder = Widget Function(BuildContext, int, int);
|
typedef InProgressBuilder = Widget Function(BuildContext, int, int);
|
||||||
|
|||||||
@@ -1,15 +1,14 @@
|
|||||||
import 'package:cached_network_image/cached_network_image.dart';
|
import 'package:cached_network_image/cached_network_image.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:shimmer/shimmer.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_chat_theme.dart';
|
||||||
import 'package:stream_chat_flutter/src/stream_svg_icon.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/upload_progress_indicator.dart';
|
||||||
import 'package:stream_chat_flutter/src/utils.dart';
|
import 'package:stream_chat_flutter/src/utils.dart';
|
||||||
import 'package:stream_chat_flutter/src/video_thumbnail_image.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_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
|
/// Widget for displaying file attachments
|
||||||
class FileAttachment extends AttachmentWidget {
|
class FileAttachment extends AttachmentWidget {
|
||||||
|
|||||||
@@ -2,10 +2,10 @@ import 'package:cached_network_image/cached_network_image.dart';
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:shimmer/shimmer.dart';
|
import 'package:shimmer/shimmer.dart';
|
||||||
import 'package:stream_chat_flutter/src/attachment/attachment_widget.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/visible_footnote.dart';
|
import 'package:stream_chat_flutter/src/visible_footnote.dart';
|
||||||
import 'package:stream_chat_flutter/stream_chat_flutter.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_core/stream_chat_flutter_core.dart';
|
||||||
import 'package:stream_chat_flutter/src/extension.dart';
|
|
||||||
|
|
||||||
/// Widget for showing a GIF attachment
|
/// Widget for showing a GIF attachment
|
||||||
class GiphyAttachment extends AttachmentWidget {
|
class GiphyAttachment extends AttachmentWidget {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:stream_chat_flutter/src/channel_info.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/src/extension.dart';
|
||||||
|
import 'package:stream_chat_flutter/stream_chat_flutter.dart';
|
||||||
|
|
||||||
/// Bottom Sheet with options
|
/// Bottom Sheet with options
|
||||||
class ChannelBottomSheet extends StatefulWidget {
|
class ChannelBottomSheet extends StatefulWidget {
|
||||||
|
|||||||
@@ -1,12 +1,13 @@
|
|||||||
import 'package:flutter/material.dart';
|
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/back_button.dart';
|
||||||
import 'package:stream_chat_flutter/src/channel_info.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/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/info_tile.dart';
|
||||||
import 'package:stream_chat_flutter/src/stream_chat_theme.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/stream_chat_flutter.dart';
|
||||||
import 'package:stream_chat_flutter_core/stream_chat_flutter_core.dart';
|
import 'package:stream_chat_flutter_core/stream_chat_flutter_core.dart';
|
||||||
import 'package:stream_chat_flutter/src/extension.dart';
|
|
||||||
|
|
||||||
/// 
|
/// 
|
||||||
/// 
|
/// 
|
||||||
@@ -141,8 +142,10 @@ class ChannelHeader extends StatelessWidget implements PreferredSizeWidget {
|
|||||||
showMessage: showConnectionStateTile && showStatus,
|
showMessage: showConnectionStateTile && showStatus,
|
||||||
message: statusString,
|
message: statusString,
|
||||||
child: AppBar(
|
child: AppBar(
|
||||||
textTheme: Theme.of(context).textTheme,
|
titleTextStyle: Theme.of(context).appBarTheme.titleTextStyle,
|
||||||
brightness: Theme.of(context).brightness,
|
systemOverlayStyle: Theme.of(context).brightness == Brightness.dark
|
||||||
|
? SystemUiOverlayStyle.dark
|
||||||
|
: SystemUiOverlayStyle.light,
|
||||||
elevation: 1,
|
elevation: 1,
|
||||||
leading: leadingWidget,
|
leading: leadingWidget,
|
||||||
backgroundColor: backgroundColor ?? channelHeaderTheme.color,
|
backgroundColor: backgroundColor ?? channelHeaderTheme.color,
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import 'package:collection/collection.dart' show IterableExtension;
|
import 'package:collection/collection.dart' show IterableExtension;
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:jiffy/jiffy.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/src/extension.dart';
|
||||||
|
import 'package:stream_chat_flutter/stream_chat_flutter.dart';
|
||||||
|
|
||||||
/// Widget which shows channel info
|
/// Widget which shows channel info
|
||||||
class ChannelInfo extends StatelessWidget {
|
class ChannelInfo extends StatelessWidget {
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import 'dart:ui';
|
import 'dart:ui';
|
||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter/services.dart';
|
||||||
import 'package:flutter_svg/flutter_svg.dart';
|
import 'package:flutter_svg/flutter_svg.dart';
|
||||||
import 'package:stream_chat_flutter/src/extension.dart';
|
import 'package:stream_chat_flutter/src/extension.dart';
|
||||||
import 'package:stream_chat_flutter/src/stream_neumorphic_button.dart';
|
import 'package:stream_chat_flutter/src/stream_neumorphic_button.dart';
|
||||||
@@ -125,8 +126,10 @@ class ChannelListHeader extends StatelessWidget implements PreferredSizeWidget {
|
|||||||
showMessage: showConnectionStateTile && showStatus,
|
showMessage: showConnectionStateTile && showStatus,
|
||||||
message: statusString,
|
message: statusString,
|
||||||
child: AppBar(
|
child: AppBar(
|
||||||
textTheme: Theme.of(context).textTheme,
|
titleTextStyle: Theme.of(context).appBarTheme.titleTextStyle,
|
||||||
brightness: Theme.of(context).brightness,
|
systemOverlayStyle: Theme.of(context).brightness == Brightness.dark
|
||||||
|
? SystemUiOverlayStyle.dark
|
||||||
|
: SystemUiOverlayStyle.light,
|
||||||
elevation: 1,
|
elevation: 1,
|
||||||
backgroundColor:
|
backgroundColor:
|
||||||
backgroundColor ?? channelListHeaderThemeData.color,
|
backgroundColor ?? channelListHeaderThemeData.color,
|
||||||
|
|||||||
@@ -4,11 +4,11 @@ import 'package:flutter/material.dart';
|
|||||||
import 'package:flutter_slidable/flutter_slidable.dart';
|
import 'package:flutter_slidable/flutter_slidable.dart';
|
||||||
import 'package:shimmer/shimmer.dart';
|
import 'package:shimmer/shimmer.dart';
|
||||||
import 'package:stream_chat_flutter/src/channel_bottom_sheet.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/stream_svg_icon.dart';
|
||||||
import 'package:stream_chat_flutter/src/theme/themes.dart';
|
import 'package:stream_chat_flutter/src/theme/themes.dart';
|
||||||
import 'package:stream_chat_flutter/stream_chat_flutter.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_core/stream_chat_flutter_core.dart';
|
||||||
import 'package:stream_chat_flutter/src/extension.dart';
|
|
||||||
|
|
||||||
/// Callback called when tapping on a channel
|
/// Callback called when tapping on a channel
|
||||||
typedef ChannelTapCallback = void Function(Channel, Widget?);
|
typedef ChannelTapCallback = void Function(Channel, Widget?);
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/rendering.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/stream_chat_flutter.dart';
|
||||||
import 'package:stream_chat_flutter_core/stream_chat_flutter_core.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.
|
/// It shows the current [Channel] name using a [Text] widget.
|
||||||
///
|
///
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:jiffy/jiffy.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/extension.dart';
|
||||||
|
import 'package:stream_chat_flutter/src/stream_chat_theme.dart';
|
||||||
|
|
||||||
/// It shows a date divider depending on the date difference
|
/// It shows a date divider depending on the date difference
|
||||||
class DateDivider extends StatelessWidget {
|
class DateDivider extends StatelessWidget {
|
||||||
|
|||||||
@@ -7,12 +7,12 @@ import 'package:flutter/foundation.dart';
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:path_provider/path_provider.dart';
|
import 'package:path_provider/path_provider.dart';
|
||||||
import 'package:share_plus/share_plus.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/stream_chat_theme.dart';
|
||||||
import 'package:stream_chat_flutter/src/theme/themes.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/src/video_thumbnail_image.dart';
|
||||||
import 'package:stream_chat_flutter/stream_chat_flutter.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_core/stream_chat_flutter_core.dart';
|
||||||
import 'package:stream_chat_flutter/src/extension.dart';
|
|
||||||
|
|
||||||
/// Footer widget for media display
|
/// Footer widget for media display
|
||||||
class GalleryFooter extends StatefulWidget implements PreferredSizeWidget {
|
class GalleryFooter extends StatefulWidget implements PreferredSizeWidget {
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import 'package:flutter/material.dart';
|
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/attachment_actions_modal.dart';
|
||||||
import 'package:stream_chat_flutter/src/stream_chat_theme.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/stream_svg_icon.dart';
|
||||||
@@ -58,8 +59,10 @@ class GalleryHeader extends StatelessWidget implements PreferredSizeWidget {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final galleryHeaderThemeData = GalleryHeaderTheme.of(context);
|
final galleryHeaderThemeData = GalleryHeaderTheme.of(context);
|
||||||
return AppBar(
|
return AppBar(
|
||||||
textTheme: Theme.of(context).textTheme,
|
titleTextStyle: Theme.of(context).appBarTheme.titleTextStyle,
|
||||||
brightness: Theme.of(context).brightness,
|
systemOverlayStyle: Theme.of(context).brightness == Brightness.dark
|
||||||
|
? SystemUiOverlayStyle.dark
|
||||||
|
: SystemUiOverlayStyle.light,
|
||||||
elevation: 1,
|
elevation: 1,
|
||||||
leading: showBackButton
|
leading: showBackButton
|
||||||
? IconButton(
|
? IconButton(
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import 'dart:ui';
|
import 'dart:ui';
|
||||||
|
|
||||||
import 'package:flutter/material.dart';
|
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_bubble.dart';
|
||||||
import 'package:stream_chat_flutter/src/reaction_picker.dart';
|
import 'package:stream_chat_flutter/src/reaction_picker.dart';
|
||||||
import 'package:stream_chat_flutter/src/stream_chat.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/src/user_avatar.dart';
|
||||||
import 'package:stream_chat_flutter/stream_chat_flutter.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_core/stream_chat_flutter_core.dart';
|
||||||
import 'package:stream_chat_flutter/src/extension.dart';
|
|
||||||
|
|
||||||
/// Modal widget for displaying message reactions
|
/// Modal widget for displaying message reactions
|
||||||
class MessageReactionsModal extends StatelessWidget {
|
class MessageReactionsModal extends StatelessWidget {
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:jiffy/jiffy.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/stream_chat_flutter.dart';
|
||||||
import 'package:stream_chat_flutter_core/stream_chat_flutter_core.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.
|
/// It shows the current [Message] preview.
|
||||||
///
|
///
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
import 'package:flutter/material.dart';
|
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/info_tile.dart';
|
||||||
import 'package:stream_chat_flutter/src/message_search_item.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/src/theme/themes.dart';
|
||||||
import 'package:stream_chat_flutter/stream_chat_flutter.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_core/stream_chat_flutter_core.dart';
|
||||||
import 'package:stream_chat_flutter/src/extension.dart';
|
|
||||||
|
|
||||||
/// Callback called when tapping on a user
|
/// Callback called when tapping on a user
|
||||||
typedef MessageSearchItemTapCallback = void Function(GetMessageResponse);
|
typedef MessageSearchItemTapCallback = void Function(GetMessageResponse);
|
||||||
|
|||||||
@@ -100,7 +100,9 @@ class StreamChatState extends State<StreamChat> {
|
|||||||
return Theme(
|
return Theme(
|
||||||
data: materialTheme.copyWith(
|
data: materialTheme.copyWith(
|
||||||
primaryIconTheme: streamTheme.primaryIconTheme,
|
primaryIconTheme: streamTheme.primaryIconTheme,
|
||||||
accentColor: streamTheme.colorTheme.accentPrimary,
|
colorScheme: materialTheme.colorScheme.copyWith(
|
||||||
|
secondary: streamTheme.colorTheme.accentPrimary,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
child: StreamChatCore(
|
child: StreamChatCore(
|
||||||
client: client,
|
client: client,
|
||||||
|
|||||||
@@ -131,7 +131,7 @@ class StreamChatThemeData {
|
|||||||
final defaultTheme = StreamChatThemeData(brightness: theme.brightness);
|
final defaultTheme = StreamChatThemeData(brightness: theme.brightness);
|
||||||
final customizedTheme = StreamChatThemeData.fromColorAndTextTheme(
|
final customizedTheme = StreamChatThemeData.fromColorAndTextTheme(
|
||||||
defaultTheme.colorTheme.copyWith(
|
defaultTheme.colorTheme.copyWith(
|
||||||
accentPrimary: theme.accentColor,
|
accentPrimary: theme.colorScheme.secondary,
|
||||||
),
|
),
|
||||||
defaultTheme.textTheme,
|
defaultTheme.textTheme,
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
import 'package:flutter/material.dart';
|
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/src/stream_chat_theme.dart';
|
||||||
import 'package:stream_chat_flutter/stream_chat_flutter.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_core/stream_chat_flutter_core.dart';
|
||||||
import 'package:stream_chat_flutter/src/extension.dart';
|
|
||||||
|
|
||||||
/// 
|
/// 
|
||||||
/// 
|
/// 
|
||||||
@@ -129,8 +130,10 @@ class ThreadHeader extends StatelessWidget implements PreferredSizeWidget {
|
|||||||
|
|
||||||
return AppBar(
|
return AppBar(
|
||||||
automaticallyImplyLeading: false,
|
automaticallyImplyLeading: false,
|
||||||
textTheme: Theme.of(context).textTheme,
|
titleTextStyle: Theme.of(context).appBarTheme.titleTextStyle,
|
||||||
brightness: Theme.of(context).brightness,
|
systemOverlayStyle: Theme.of(context).brightness == Brightness.dark
|
||||||
|
? SystemUiOverlayStyle.dark
|
||||||
|
: SystemUiOverlayStyle.light,
|
||||||
elevation: 1,
|
elevation: 1,
|
||||||
leading: leading ??
|
leading: leading ??
|
||||||
(showBackButton
|
(showBackButton
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:lottie/lottie.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/src/extension.dart';
|
||||||
|
import 'package:stream_chat_flutter_core/stream_chat_flutter_core.dart';
|
||||||
|
|
||||||
/// Widget to show the current list of typing users
|
/// Widget to show the current list of typing users
|
||||||
class TypingIndicator extends StatelessWidget {
|
class TypingIndicator extends StatelessWidget {
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:jiffy/jiffy.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/stream_svg_icon.dart';
|
||||||
import 'package:stream_chat_flutter/src/user_list_view.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/stream_chat_flutter.dart';
|
||||||
import 'package:stream_chat_flutter_core/stream_chat_flutter_core.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.
|
/// It shows the current [User] preview.
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import 'package:flutter/material.dart';
|
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/src/theme/themes.dart';
|
||||||
import 'package:stream_chat_flutter/stream_chat_flutter.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_core/stream_chat_flutter_core.dart';
|
||||||
import 'package:stream_chat_flutter/src/extension.dart';
|
|
||||||
|
|
||||||
/// Callback called when tapping on a user
|
/// Callback called when tapping on a user
|
||||||
typedef UserTapCallback = void Function(User, Widget?);
|
typedef UserTapCallback = void Function(User, Widget?);
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:stream_chat_flutter/src/extension.dart';
|
||||||
import 'package:stream_chat_flutter/stream_chat_flutter.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_core/stream_chat_flutter_core.dart';
|
||||||
import 'package:url_launcher/url_launcher.dart';
|
import 'package:url_launcher/url_launcher.dart';
|
||||||
import 'package:stream_chat_flutter/src/extension.dart';
|
|
||||||
|
|
||||||
/// Launch URL
|
/// Launch URL
|
||||||
Future<void> launchURL(BuildContext context, String url) async {
|
Future<void> launchURL(BuildContext context, String url) async {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import 'package:flutter/material.dart';
|
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/src/stream_chat_theme.dart';
|
||||||
import 'package:stream_chat_flutter/stream_chat_flutter.dart';
|
import 'package:stream_chat_flutter/stream_chat_flutter.dart';
|
||||||
import 'package:stream_chat_flutter/src/extension.dart';
|
|
||||||
|
|
||||||
/// Widget for displaying a footnote
|
/// Widget for displaying a footnote
|
||||||
class VisibleFootnote extends StatelessWidget {
|
class VisibleFootnote extends StatelessWidget {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import 'package:flutter/material.dart' hide TextTheme;
|
import 'package:flutter/material.dart' hide TextTheme;
|
||||||
import 'package:flutter_test/flutter_test.dart';
|
import 'package:flutter_test/flutter_test.dart';
|
||||||
import 'package:stream_chat_flutter/stream_chat_flutter.dart';
|
|
||||||
import 'package:mocktail/mocktail.dart';
|
import 'package:mocktail/mocktail.dart';
|
||||||
|
import 'package:stream_chat_flutter/stream_chat_flutter.dart';
|
||||||
|
|
||||||
class MockStreamChatClient extends Mock implements StreamChatClient {}
|
class MockStreamChatClient extends Mock implements StreamChatClient {}
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_test/flutter_test.dart';
|
import 'package:flutter_test/flutter_test.dart';
|
||||||
import 'package:stream_chat_flutter/stream_chat_flutter.dart';
|
|
||||||
import 'package:mocktail/mocktail.dart';
|
import 'package:mocktail/mocktail.dart';
|
||||||
|
import 'package:stream_chat_flutter/stream_chat_flutter.dart';
|
||||||
|
|
||||||
class MockStreamChatClient extends Mock implements StreamChatClient {}
|
class MockStreamChatClient extends Mock implements StreamChatClient {}
|
||||||
|
|
||||||
|
|||||||
@@ -129,7 +129,7 @@ void main() {
|
|||||||
emptyBuilder: (BuildContext context) => const Offstage(),
|
emptyBuilder: (BuildContext context) => const Offstage(),
|
||||||
errorBuilder: (BuildContext context, Object error) =>
|
errorBuilder: (BuildContext context, Object error) =>
|
||||||
Container(key: errorWidgetKey),
|
Container(key: errorWidgetKey),
|
||||||
pagination: pagination,
|
limit: pagination.limit,
|
||||||
);
|
);
|
||||||
|
|
||||||
final mockClient = MockClient();
|
final mockClient = MockClient();
|
||||||
@@ -186,7 +186,7 @@ void main() {
|
|||||||
loadingBuilder: (BuildContext context) => const Offstage(),
|
loadingBuilder: (BuildContext context) => const Offstage(),
|
||||||
emptyBuilder: (BuildContext context) => Container(key: emptyWidgetKey),
|
emptyBuilder: (BuildContext context) => Container(key: emptyWidgetKey),
|
||||||
errorBuilder: (BuildContext context, Object error) => const Offstage(),
|
errorBuilder: (BuildContext context, Object error) => const Offstage(),
|
||||||
pagination: pagination,
|
limit: pagination.limit,
|
||||||
);
|
);
|
||||||
|
|
||||||
final mockClient = MockClient();
|
final mockClient = MockClient();
|
||||||
@@ -243,7 +243,7 @@ void main() {
|
|||||||
loadingBuilder: (BuildContext context) => const Offstage(),
|
loadingBuilder: (BuildContext context) => const Offstage(),
|
||||||
emptyBuilder: (BuildContext context) => const Offstage(),
|
emptyBuilder: (BuildContext context) => const Offstage(),
|
||||||
errorBuilder: (BuildContext context, Object error) => const Offstage(),
|
errorBuilder: (BuildContext context, Object error) => const Offstage(),
|
||||||
pagination: pagination,
|
limit: pagination.limit,
|
||||||
);
|
);
|
||||||
|
|
||||||
final mockClient = MockClient();
|
final mockClient = MockClient();
|
||||||
@@ -306,7 +306,7 @@ void main() {
|
|||||||
loadingBuilder: (BuildContext context) => const Offstage(),
|
loadingBuilder: (BuildContext context) => const Offstage(),
|
||||||
emptyBuilder: (BuildContext context) => const Offstage(),
|
emptyBuilder: (BuildContext context) => const Offstage(),
|
||||||
errorBuilder: (BuildContext context, Object error) => const Offstage(),
|
errorBuilder: (BuildContext context, Object error) => const Offstage(),
|
||||||
pagination: pagination,
|
limit: pagination.limit,
|
||||||
);
|
);
|
||||||
|
|
||||||
final mockClient = MockClient();
|
final mockClient = MockClient();
|
||||||
@@ -420,7 +420,7 @@ void main() {
|
|||||||
emptyBuilder: (BuildContext context) => const Offstage(),
|
emptyBuilder: (BuildContext context) => const Offstage(),
|
||||||
errorBuilder: (BuildContext context, Object error) =>
|
errorBuilder: (BuildContext context, Object error) =>
|
||||||
const Offstage(),
|
const Offstage(),
|
||||||
pagination: pagination.copyWith(limit: limit),
|
limit: limit,
|
||||||
);
|
);
|
||||||
|
|
||||||
final mockClient = MockClient();
|
final mockClient = MockClient();
|
||||||
@@ -516,7 +516,7 @@ void main() {
|
|||||||
loadingBuilder: (BuildContext context) => const Offstage(),
|
loadingBuilder: (BuildContext context) => const Offstage(),
|
||||||
emptyBuilder: (BuildContext context) => const Offstage(),
|
emptyBuilder: (BuildContext context) => const Offstage(),
|
||||||
errorBuilder: (BuildContext context, Object error) => const Offstage(),
|
errorBuilder: (BuildContext context, Object error) => const Offstage(),
|
||||||
pagination: pagination,
|
limit: pagination.limit,
|
||||||
);
|
);
|
||||||
|
|
||||||
expect(channelListCore.limit, pagination.limit);
|
expect(channelListCore.limit, pagination.limit);
|
||||||
|
|||||||
@@ -334,7 +334,7 @@ void main() {
|
|||||||
loadingBuilder: (BuildContext context) => const Offstage(),
|
loadingBuilder: (BuildContext context) => const Offstage(),
|
||||||
emptyBuilder: (BuildContext context) => const Offstage(),
|
emptyBuilder: (BuildContext context) => const Offstage(),
|
||||||
errorBuilder: (BuildContext context, Object error) => const Offstage(),
|
errorBuilder: (BuildContext context, Object error) => const Offstage(),
|
||||||
paginationParams: pagination,
|
limit: pagination.limit,
|
||||||
filters: testFilter,
|
filters: testFilter,
|
||||||
messageFilters: testMessageFilter,
|
messageFilters: testMessageFilter,
|
||||||
);
|
);
|
||||||
@@ -457,7 +457,7 @@ void main() {
|
|||||||
emptyBuilder: (BuildContext context) => const Offstage(),
|
emptyBuilder: (BuildContext context) => const Offstage(),
|
||||||
errorBuilder: (BuildContext context, Object error) =>
|
errorBuilder: (BuildContext context, Object error) =>
|
||||||
const Offstage(),
|
const Offstage(),
|
||||||
paginationParams: pagination.copyWith(limit: limit),
|
limit: limit,
|
||||||
filters: testFilter,
|
filters: testFilter,
|
||||||
messageFilters: testMessageFilter,
|
messageFilters: testMessageFilter,
|
||||||
);
|
);
|
||||||
@@ -561,7 +561,7 @@ void main() {
|
|||||||
errorBuilder: (BuildContext context, Object? error) => const Offstage(),
|
errorBuilder: (BuildContext context, Object? error) => const Offstage(),
|
||||||
filters: testFilter,
|
filters: testFilter,
|
||||||
messageFilters: testMessageFilter,
|
messageFilters: testMessageFilter,
|
||||||
paginationParams: pagination,
|
limit: pagination.limit,
|
||||||
);
|
);
|
||||||
|
|
||||||
expect(messageSearchListCore.limit, pagination.limit);
|
expect(messageSearchListCore.limit, pagination.limit);
|
||||||
|
|||||||
@@ -341,7 +341,7 @@ void main() {
|
|||||||
loadingBuilder: (BuildContext context) => const Offstage(),
|
loadingBuilder: (BuildContext context) => const Offstage(),
|
||||||
emptyBuilder: (BuildContext context) => const Offstage(),
|
emptyBuilder: (BuildContext context) => const Offstage(),
|
||||||
errorBuilder: (BuildContext context, Object error) => const Offstage(),
|
errorBuilder: (BuildContext context, Object error) => const Offstage(),
|
||||||
pagination: pagination,
|
limit: pagination.limit,
|
||||||
groupAlphabetically: true,
|
groupAlphabetically: true,
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -447,7 +447,7 @@ void main() {
|
|||||||
emptyBuilder: (BuildContext context) => const Offstage(),
|
emptyBuilder: (BuildContext context) => const Offstage(),
|
||||||
errorBuilder: (BuildContext context, Object error) =>
|
errorBuilder: (BuildContext context, Object error) =>
|
||||||
const Offstage(),
|
const Offstage(),
|
||||||
pagination: pagination.copyWith(limit: limit),
|
limit: limit,
|
||||||
groupAlphabetically: true,
|
groupAlphabetically: true,
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -522,15 +522,15 @@ void main() {
|
|||||||
);
|
);
|
||||||
|
|
||||||
test('`widget.limit` should match `widget.pagination.limit`', () {
|
test('`widget.limit` should match `widget.pagination.limit`', () {
|
||||||
const pagination = PaginationParams(limit: 30);
|
const limit = 30;
|
||||||
final userListCore = UserListCore(
|
final userListCore = UserListCore(
|
||||||
listBuilder: (_, __) => const Offstage(),
|
listBuilder: (_, __) => const Offstage(),
|
||||||
loadingBuilder: (BuildContext context) => const Offstage(),
|
loadingBuilder: (BuildContext context) => const Offstage(),
|
||||||
emptyBuilder: (BuildContext context) => const Offstage(),
|
emptyBuilder: (BuildContext context) => const Offstage(),
|
||||||
errorBuilder: (BuildContext context, Object error) => const Offstage(),
|
errorBuilder: (BuildContext context, Object error) => const Offstage(),
|
||||||
pagination: pagination,
|
limit: limit,
|
||||||
);
|
);
|
||||||
|
|
||||||
expect(userListCore.limit, pagination.limit);
|
expect(userListCore.limit, limit);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
import 'package:flutter/foundation.dart';
|
import 'package:flutter/foundation.dart';
|
||||||
import 'package:flutter/material.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_flutter/stream_chat_flutter.dart';
|
||||||
import 'package:stream_chat_localizations/src/stream_chat_localizations.dart';
|
import 'package:stream_chat_localizations/src/stream_chat_localizations.dart';
|
||||||
import 'package:flutter_test/flutter_test.dart';
|
|
||||||
|
|
||||||
class FooStreamChatLocalizations extends StreamChatLocalizationsEn {
|
class FooStreamChatLocalizations extends StreamChatLocalizationsEn {
|
||||||
FooStreamChatLocalizations(
|
FooStreamChatLocalizations(
|
||||||
|
|||||||
@@ -7,11 +7,10 @@ import 'package:moor/isolate.dart';
|
|||||||
import 'package:moor/moor.dart';
|
import 'package:moor/moor.dart';
|
||||||
import 'package:path/path.dart';
|
import 'package:path/path.dart';
|
||||||
import 'package:path_provider/path_provider.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/src/stream_chat_persistence_client.dart';
|
||||||
import 'package:stream_chat_persistence/stream_chat_persistence.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
|
/// A Helper class to construct new instances of [MoorChatDatabase] specifically
|
||||||
/// for native platform applications
|
/// for native platform applications
|
||||||
class SharedDB {
|
class SharedDB {
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
// coverage:ignore-file
|
// coverage:ignore-file
|
||||||
import 'package:moor/moor_web.dart';
|
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/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
|
/// A Helper class to construct new instances of [MoorChatDatabase] specifically
|
||||||
/// for Web applications
|
/// for Web applications
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
|
|
||||||
import 'package:test/test.dart';
|
|
||||||
import 'package:stream_chat_persistence/src/converter/list_converter.dart';
|
import 'package:stream_chat_persistence/src/converter/list_converter.dart';
|
||||||
|
import 'package:test/test.dart';
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
group('mapToDart', () {
|
group('mapToDart', () {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
|
|
||||||
import 'package:test/test.dart';
|
|
||||||
import 'package:stream_chat_persistence/src/converter/map_converter.dart';
|
import 'package:stream_chat_persistence/src/converter/map_converter.dart';
|
||||||
|
import 'package:test/test.dart';
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
group('mapToDart', () {
|
group('mapToDart', () {
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
import 'package:test/test.dart';
|
|
||||||
import 'package:stream_chat/stream_chat.dart';
|
import 'package:stream_chat/stream_chat.dart';
|
||||||
import 'package:stream_chat_persistence/src/converter/message_sending_status_converter.dart';
|
import 'package:stream_chat_persistence/src/converter/message_sending_status_converter.dart';
|
||||||
|
import 'package:test/test.dart';
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
group('mapToDart', () {
|
group('mapToDart', () {
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
import 'dart:math' as math;
|
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/dao/dao.dart';
|
||||||
import 'package:stream_chat_persistence/src/db/moor_chat_database.dart';
|
import 'package:stream_chat_persistence/src/db/moor_chat_database.dart';
|
||||||
import 'package:test/test.dart';
|
import 'package:test/test.dart';
|
||||||
import 'package:stream_chat/stream_chat.dart';
|
|
||||||
|
|
||||||
import '../../stream_chat_persistence_client_test.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/ffi.dart';
|
||||||
import 'package:moor/isolate.dart';
|
import 'package:moor/isolate.dart';
|
||||||
import 'package:moor/moor.dart' hide isNotNull;
|
import 'package:moor/moor.dart' hide isNotNull;
|
||||||
import 'package:stream_chat_persistence/src/db/moor_chat_database.dart';
|
import 'package:stream_chat_persistence/src/db/moor_chat_database.dart';
|
||||||
|
import 'package:test/test.dart';
|
||||||
|
|
||||||
DatabaseConnection _backgroundConnection() =>
|
DatabaseConnection _backgroundConnection() =>
|
||||||
DatabaseConnection.fromExecutor(VmDatabase.memory());
|
DatabaseConnection.fromExecutor(VmDatabase.memory());
|
||||||
|
|||||||
@@ -1,9 +1,10 @@
|
|||||||
import 'dart:math' as math;
|
import 'dart:math' as math;
|
||||||
|
|
||||||
import 'package:test/test.dart';
|
|
||||||
import 'package:stream_chat/stream_chat.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/db/moor_chat_database.dart';
|
||||||
import 'package:stream_chat_persistence/src/mapper/channel_mapper.dart';
|
import 'package:stream_chat_persistence/src/mapper/channel_mapper.dart';
|
||||||
|
import 'package:test/test.dart';
|
||||||
|
|
||||||
import '../utils/date_matcher.dart';
|
import '../utils/date_matcher.dart';
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
import 'dart:math' as math;
|
import 'dart:math' as math;
|
||||||
|
|
||||||
import 'package:test/test.dart';
|
|
||||||
import 'package:stream_chat/stream_chat.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/db/moor_chat_database.dart';
|
||||||
import 'package:stream_chat_persistence/src/mapper/member_mapper.dart';
|
import 'package:stream_chat_persistence/src/mapper/member_mapper.dart';
|
||||||
|
import 'package:test/test.dart';
|
||||||
|
|
||||||
import '../utils/date_matcher.dart';
|
import '../utils/date_matcher.dart';
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
import 'dart:math' as math;
|
import 'dart:math' as math;
|
||||||
|
|
||||||
import 'package:test/test.dart';
|
|
||||||
import 'package:stream_chat/stream_chat.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/db/moor_chat_database.dart';
|
||||||
import 'package:stream_chat_persistence/src/mapper/message_mapper.dart';
|
import 'package:stream_chat_persistence/src/mapper/message_mapper.dart';
|
||||||
|
import 'package:test/test.dart';
|
||||||
|
|
||||||
import '../utils/date_matcher.dart';
|
import '../utils/date_matcher.dart';
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
import 'dart:convert';
|
import 'dart:convert';
|
||||||
import 'dart:math' as math;
|
import 'dart:math' as math;
|
||||||
|
|
||||||
import 'package:test/test.dart';
|
|
||||||
import 'package:stream_chat/stream_chat.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/db/moor_chat_database.dart';
|
||||||
import 'package:stream_chat_persistence/src/mapper/pinned_message_mapper.dart';
|
import 'package:stream_chat_persistence/src/mapper/pinned_message_mapper.dart';
|
||||||
|
import 'package:test/test.dart';
|
||||||
|
|
||||||
import '../utils/date_matcher.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/stream_chat.dart';
|
||||||
import 'package:stream_chat_persistence/src/db/moor_chat_database.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:stream_chat_persistence/src/mapper/pinned_message_reaction_mapper.dart';
|
||||||
|
import 'package:test/test.dart';
|
||||||
|
|
||||||
import '../utils/date_matcher.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/stream_chat.dart';
|
||||||
import 'package:stream_chat_persistence/src/db/moor_chat_database.dart';
|
import 'package:stream_chat_persistence/src/db/moor_chat_database.dart';
|
||||||
import 'package:stream_chat_persistence/src/mapper/reaction_mapper.dart';
|
import 'package:stream_chat_persistence/src/mapper/reaction_mapper.dart';
|
||||||
|
import 'package:test/test.dart';
|
||||||
|
|
||||||
import '../utils/date_matcher.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/stream_chat.dart';
|
||||||
import 'package:stream_chat_persistence/src/db/moor_chat_database.dart';
|
import 'package:stream_chat_persistence/src/db/moor_chat_database.dart';
|
||||||
import 'package:stream_chat_persistence/src/mapper/read_mapper.dart';
|
import 'package:stream_chat_persistence/src/mapper/read_mapper.dart';
|
||||||
|
import 'package:test/test.dart';
|
||||||
|
|
||||||
import '../utils/date_matcher.dart';
|
import '../utils/date_matcher.dart';
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
import 'dart:math' as math;
|
import 'dart:math' as math;
|
||||||
import 'package:test/test.dart';
|
|
||||||
import 'package:stream_chat/stream_chat.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/db/moor_chat_database.dart';
|
||||||
import 'package:stream_chat_persistence/src/mapper/user_mapper.dart';
|
import 'package:stream_chat_persistence/src/mapper/user_mapper.dart';
|
||||||
|
import 'package:test/test.dart';
|
||||||
|
|
||||||
import '../utils/date_matcher.dart';
|
import '../utils/date_matcher.dart';
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user