feat(llc,core,ui,persistence,localization): update dependencies.
Signed-off-by: xsahil03x <xdsahil@gmail.com>
This commit is contained in:
+2
-2
@@ -51,11 +51,11 @@ scripts:
|
||||
description: Build all generated files for Dart & Flutter packages in this project.
|
||||
|
||||
generate:dart:
|
||||
run: melos exec -c 1 --depends-on="build_runner" --no-flutter -- "dart run build_runner build --delete-conflicting-outputs --enable-experiment=super-parameters,enhanced-enums"
|
||||
run: melos exec -c 1 --depends-on="build_runner" --no-flutter -- "dart run build_runner build --delete-conflicting-outputs"
|
||||
description: Build all generated files for Dart packages in this project.
|
||||
|
||||
generate:flutter:
|
||||
run: melos exec -c 1 --depends-on="build_runner" --flutter -- "flutter run build_runner build --delete-conflicting-outputs --enable-experiment=super-parameters,enhanced-enums"
|
||||
run: melos exec -c 1 --depends-on="build_runner" --flutter -- "flutter pub run build_runner build --delete-conflicting-outputs"
|
||||
description: Build all generated files for Flutter packages in this project.
|
||||
|
||||
test:all:
|
||||
|
||||
@@ -6,6 +6,7 @@ version: 1.0.0+1
|
||||
|
||||
environment:
|
||||
sdk: '>=2.17.0 <3.0.0'
|
||||
flutter: ">=1.17.0"
|
||||
|
||||
dependencies:
|
||||
cupertino_icons: ^1.0.0
|
||||
|
||||
@@ -98,8 +98,10 @@ class StreamChatNetworkError extends StreamChatError {
|
||||
}
|
||||
return StreamChatNetworkError.raw(
|
||||
code: errorResponse?.code ?? -1,
|
||||
message:
|
||||
errorResponse?.message ?? response?.statusMessage ?? error.message,
|
||||
message: errorResponse?.message ??
|
||||
response?.statusMessage ??
|
||||
error.message ??
|
||||
'',
|
||||
statusCode: errorResponse?.statusCode ?? response?.statusCode,
|
||||
data: errorResponse,
|
||||
isRequestCancelledError: error.type == DioErrorType.cancel,
|
||||
|
||||
@@ -87,8 +87,8 @@ class LoggingInterceptor extends Interceptor {
|
||||
requestHeaders['contentType'] = options.contentType?.toString();
|
||||
requestHeaders['responseType'] = options.responseType.toString();
|
||||
requestHeaders['followRedirects'] = options.followRedirects;
|
||||
requestHeaders['connectTimeout'] = options.connectTimeout;
|
||||
requestHeaders['receiveTimeout'] = options.receiveTimeout;
|
||||
requestHeaders['connectTimeout'] = options.connectTimeout?.toString();
|
||||
requestHeaders['receiveTimeout'] = options.receiveTimeout?.toString();
|
||||
_printMapAsTable(_logPrintRequest, requestHeaders, header: 'Headers');
|
||||
_printMapAsTable(_logPrintRequest, options.extra, header: 'Extras');
|
||||
}
|
||||
@@ -101,7 +101,8 @@ class LoggingInterceptor extends Interceptor {
|
||||
options.data as Map?,
|
||||
header: 'Body',
|
||||
);
|
||||
} else if (data is FormData) {
|
||||
}
|
||||
if (data is FormData) {
|
||||
final formDataMap = <String, dynamic>{}
|
||||
..addEntries(data.fields)
|
||||
..addEntries(data.files);
|
||||
@@ -121,7 +122,7 @@ class LoggingInterceptor extends Interceptor {
|
||||
@override
|
||||
void onError(DioError err, ErrorInterceptorHandler handler) {
|
||||
if (error) {
|
||||
if (err.type == DioErrorType.response) {
|
||||
if (err.type == DioErrorType.badResponse) {
|
||||
final uri = err.response?.requestOptions.uri;
|
||||
_printBoxed(
|
||||
_logPrintError,
|
||||
@@ -162,7 +163,7 @@ class LoggingInterceptor extends Interceptor {
|
||||
_logPrintResponse('║');
|
||||
_printResponse(_logPrintResponse, response);
|
||||
_logPrintResponse('║');
|
||||
_printLine(_logPrintResponse, '╚');
|
||||
_logPrintResponse('╚');
|
||||
}
|
||||
super.onResponse(response, handler);
|
||||
}
|
||||
|
||||
@@ -29,8 +29,8 @@ class StreamHttpClient {
|
||||
httpClient = dio ?? Dio() {
|
||||
httpClient
|
||||
..options.baseUrl = _options.baseUrl
|
||||
..options.receiveTimeout = _options.receiveTimeout.inMilliseconds
|
||||
..options.connectTimeout = _options.connectTimeout.inMilliseconds
|
||||
..options.receiveTimeout = _options.receiveTimeout
|
||||
..options.connectTimeout = _options.connectTimeout
|
||||
..options.queryParameters = {
|
||||
'api_key': apiKey,
|
||||
..._options.queryParameters,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// coverage:ignore-file
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target
|
||||
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
|
||||
|
||||
part of 'attachment_file.dart';
|
||||
|
||||
@@ -43,10 +43,10 @@ mixin _$UploadState {
|
||||
throw _privateConstructorUsedError;
|
||||
@optionalTypeArgs
|
||||
TResult? whenOrNull<TResult extends Object?>({
|
||||
TResult Function()? preparing,
|
||||
TResult Function(int uploaded, int total)? inProgress,
|
||||
TResult Function()? success,
|
||||
TResult Function(String error)? failed,
|
||||
TResult? Function()? preparing,
|
||||
TResult? Function(int uploaded, int total)? inProgress,
|
||||
TResult? Function()? success,
|
||||
TResult? Function(String error)? failed,
|
||||
}) =>
|
||||
throw _privateConstructorUsedError;
|
||||
@optionalTypeArgs
|
||||
@@ -68,10 +68,10 @@ mixin _$UploadState {
|
||||
throw _privateConstructorUsedError;
|
||||
@optionalTypeArgs
|
||||
TResult? mapOrNull<TResult extends Object?>({
|
||||
TResult Function(Preparing value)? preparing,
|
||||
TResult Function(InProgress value)? inProgress,
|
||||
TResult Function(Success value)? success,
|
||||
TResult Function(Failed value)? failed,
|
||||
TResult? Function(Preparing value)? preparing,
|
||||
TResult? Function(InProgress value)? inProgress,
|
||||
TResult? Function(Success value)? success,
|
||||
TResult? Function(Failed value)? failed,
|
||||
}) =>
|
||||
throw _privateConstructorUsedError;
|
||||
@optionalTypeArgs
|
||||
@@ -90,16 +90,18 @@ mixin _$UploadState {
|
||||
abstract class $UploadStateCopyWith<$Res> {
|
||||
factory $UploadStateCopyWith(
|
||||
UploadState value, $Res Function(UploadState) then) =
|
||||
_$UploadStateCopyWithImpl<$Res>;
|
||||
_$UploadStateCopyWithImpl<$Res, UploadState>;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$UploadStateCopyWithImpl<$Res> implements $UploadStateCopyWith<$Res> {
|
||||
class _$UploadStateCopyWithImpl<$Res, $Val extends UploadState>
|
||||
implements $UploadStateCopyWith<$Res> {
|
||||
_$UploadStateCopyWithImpl(this._value, this._then);
|
||||
|
||||
final UploadState _value;
|
||||
// ignore: unused_field
|
||||
final $Res Function(UploadState) _then;
|
||||
final $Val _value;
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@@ -110,14 +112,12 @@ abstract class _$$PreparingCopyWith<$Res> {
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$PreparingCopyWithImpl<$Res> extends _$UploadStateCopyWithImpl<$Res>
|
||||
class __$$PreparingCopyWithImpl<$Res>
|
||||
extends _$UploadStateCopyWithImpl<$Res, _$Preparing>
|
||||
implements _$$PreparingCopyWith<$Res> {
|
||||
__$$PreparingCopyWithImpl(
|
||||
_$Preparing _value, $Res Function(_$Preparing) _then)
|
||||
: super(_value, (v) => _then(v as _$Preparing));
|
||||
|
||||
@override
|
||||
_$Preparing get _value => super._value as _$Preparing;
|
||||
: super(_value, _then);
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@@ -162,10 +162,10 @@ class _$Preparing extends Preparing {
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
TResult? whenOrNull<TResult extends Object?>({
|
||||
TResult Function()? preparing,
|
||||
TResult Function(int uploaded, int total)? inProgress,
|
||||
TResult Function()? success,
|
||||
TResult Function(String error)? failed,
|
||||
TResult? Function()? preparing,
|
||||
TResult? Function(int uploaded, int total)? inProgress,
|
||||
TResult? Function()? success,
|
||||
TResult? Function(String error)? failed,
|
||||
}) {
|
||||
return preparing?.call();
|
||||
}
|
||||
@@ -199,10 +199,10 @@ class _$Preparing extends Preparing {
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
TResult? mapOrNull<TResult extends Object?>({
|
||||
TResult Function(Preparing value)? preparing,
|
||||
TResult Function(InProgress value)? inProgress,
|
||||
TResult Function(Success value)? success,
|
||||
TResult Function(Failed value)? failed,
|
||||
TResult? Function(Preparing value)? preparing,
|
||||
TResult? Function(InProgress value)? inProgress,
|
||||
TResult? Function(Success value)? success,
|
||||
TResult? Function(Failed value)? failed,
|
||||
}) {
|
||||
return preparing?.call(this);
|
||||
}
|
||||
@@ -242,30 +242,30 @@ abstract class _$$InProgressCopyWith<$Res> {
|
||||
factory _$$InProgressCopyWith(
|
||||
_$InProgress value, $Res Function(_$InProgress) then) =
|
||||
__$$InProgressCopyWithImpl<$Res>;
|
||||
@useResult
|
||||
$Res call({int uploaded, int total});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$InProgressCopyWithImpl<$Res> extends _$UploadStateCopyWithImpl<$Res>
|
||||
class __$$InProgressCopyWithImpl<$Res>
|
||||
extends _$UploadStateCopyWithImpl<$Res, _$InProgress>
|
||||
implements _$$InProgressCopyWith<$Res> {
|
||||
__$$InProgressCopyWithImpl(
|
||||
_$InProgress _value, $Res Function(_$InProgress) _then)
|
||||
: super(_value, (v) => _then(v as _$InProgress));
|
||||
|
||||
@override
|
||||
_$InProgress get _value => super._value as _$InProgress;
|
||||
: super(_value, _then);
|
||||
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? uploaded = freezed,
|
||||
Object? total = freezed,
|
||||
Object? uploaded = null,
|
||||
Object? total = null,
|
||||
}) {
|
||||
return _then(_$InProgress(
|
||||
uploaded: uploaded == freezed
|
||||
uploaded: null == uploaded
|
||||
? _value.uploaded
|
||||
: uploaded // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
total: total == freezed
|
||||
total: null == total
|
||||
? _value.total
|
||||
: total // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
@@ -302,19 +302,18 @@ class _$InProgress extends InProgress {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$InProgress &&
|
||||
const DeepCollectionEquality().equals(other.uploaded, uploaded) &&
|
||||
const DeepCollectionEquality().equals(other.total, total));
|
||||
(identical(other.uploaded, uploaded) ||
|
||||
other.uploaded == uploaded) &&
|
||||
(identical(other.total, total) || other.total == total));
|
||||
}
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
@override
|
||||
int get hashCode => Object.hash(
|
||||
runtimeType,
|
||||
const DeepCollectionEquality().hash(uploaded),
|
||||
const DeepCollectionEquality().hash(total));
|
||||
int get hashCode => Object.hash(runtimeType, uploaded, total);
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$InProgressCopyWith<_$InProgress> get copyWith =>
|
||||
__$$InProgressCopyWithImpl<_$InProgress>(this, _$identity);
|
||||
|
||||
@@ -332,10 +331,10 @@ class _$InProgress extends InProgress {
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
TResult? whenOrNull<TResult extends Object?>({
|
||||
TResult Function()? preparing,
|
||||
TResult Function(int uploaded, int total)? inProgress,
|
||||
TResult Function()? success,
|
||||
TResult Function(String error)? failed,
|
||||
TResult? Function()? preparing,
|
||||
TResult? Function(int uploaded, int total)? inProgress,
|
||||
TResult? Function()? success,
|
||||
TResult? Function(String error)? failed,
|
||||
}) {
|
||||
return inProgress?.call(uploaded, total);
|
||||
}
|
||||
@@ -369,10 +368,10 @@ class _$InProgress extends InProgress {
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
TResult? mapOrNull<TResult extends Object?>({
|
||||
TResult Function(Preparing value)? preparing,
|
||||
TResult Function(InProgress value)? inProgress,
|
||||
TResult Function(Success value)? success,
|
||||
TResult Function(Failed value)? failed,
|
||||
TResult? Function(Preparing value)? preparing,
|
||||
TResult? Function(InProgress value)? inProgress,
|
||||
TResult? Function(Success value)? success,
|
||||
TResult? Function(Failed value)? failed,
|
||||
}) {
|
||||
return inProgress?.call(this);
|
||||
}
|
||||
@@ -422,13 +421,11 @@ abstract class _$$SuccessCopyWith<$Res> {
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$SuccessCopyWithImpl<$Res> extends _$UploadStateCopyWithImpl<$Res>
|
||||
class __$$SuccessCopyWithImpl<$Res>
|
||||
extends _$UploadStateCopyWithImpl<$Res, _$Success>
|
||||
implements _$$SuccessCopyWith<$Res> {
|
||||
__$$SuccessCopyWithImpl(_$Success _value, $Res Function(_$Success) _then)
|
||||
: super(_value, (v) => _then(v as _$Success));
|
||||
|
||||
@override
|
||||
_$Success get _value => super._value as _$Success;
|
||||
: super(_value, _then);
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@@ -473,10 +470,10 @@ class _$Success extends Success {
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
TResult? whenOrNull<TResult extends Object?>({
|
||||
TResult Function()? preparing,
|
||||
TResult Function(int uploaded, int total)? inProgress,
|
||||
TResult Function()? success,
|
||||
TResult Function(String error)? failed,
|
||||
TResult? Function()? preparing,
|
||||
TResult? Function(int uploaded, int total)? inProgress,
|
||||
TResult? Function()? success,
|
||||
TResult? Function(String error)? failed,
|
||||
}) {
|
||||
return success?.call();
|
||||
}
|
||||
@@ -510,10 +507,10 @@ class _$Success extends Success {
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
TResult? mapOrNull<TResult extends Object?>({
|
||||
TResult Function(Preparing value)? preparing,
|
||||
TResult Function(InProgress value)? inProgress,
|
||||
TResult Function(Success value)? success,
|
||||
TResult Function(Failed value)? failed,
|
||||
TResult? Function(Preparing value)? preparing,
|
||||
TResult? Function(InProgress value)? inProgress,
|
||||
TResult? Function(Success value)? success,
|
||||
TResult? Function(Failed value)? failed,
|
||||
}) {
|
||||
return success?.call(this);
|
||||
}
|
||||
@@ -552,24 +549,24 @@ abstract class Success extends UploadState {
|
||||
abstract class _$$FailedCopyWith<$Res> {
|
||||
factory _$$FailedCopyWith(_$Failed value, $Res Function(_$Failed) then) =
|
||||
__$$FailedCopyWithImpl<$Res>;
|
||||
@useResult
|
||||
$Res call({String error});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$FailedCopyWithImpl<$Res> extends _$UploadStateCopyWithImpl<$Res>
|
||||
class __$$FailedCopyWithImpl<$Res>
|
||||
extends _$UploadStateCopyWithImpl<$Res, _$Failed>
|
||||
implements _$$FailedCopyWith<$Res> {
|
||||
__$$FailedCopyWithImpl(_$Failed _value, $Res Function(_$Failed) _then)
|
||||
: super(_value, (v) => _then(v as _$Failed));
|
||||
|
||||
@override
|
||||
_$Failed get _value => super._value as _$Failed;
|
||||
: super(_value, _then);
|
||||
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? error = freezed,
|
||||
Object? error = null,
|
||||
}) {
|
||||
return _then(_$Failed(
|
||||
error: error == freezed
|
||||
error: null == error
|
||||
? _value.error
|
||||
: error // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
@@ -603,16 +600,16 @@ class _$Failed extends Failed {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$Failed &&
|
||||
const DeepCollectionEquality().equals(other.error, error));
|
||||
(identical(other.error, error) || other.error == error));
|
||||
}
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
@override
|
||||
int get hashCode =>
|
||||
Object.hash(runtimeType, const DeepCollectionEquality().hash(error));
|
||||
int get hashCode => Object.hash(runtimeType, error);
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$FailedCopyWith<_$Failed> get copyWith =>
|
||||
__$$FailedCopyWithImpl<_$Failed>(this, _$identity);
|
||||
|
||||
@@ -630,10 +627,10 @@ class _$Failed extends Failed {
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
TResult? whenOrNull<TResult extends Object?>({
|
||||
TResult Function()? preparing,
|
||||
TResult Function(int uploaded, int total)? inProgress,
|
||||
TResult Function()? success,
|
||||
TResult Function(String error)? failed,
|
||||
TResult? Function()? preparing,
|
||||
TResult? Function(int uploaded, int total)? inProgress,
|
||||
TResult? Function()? success,
|
||||
TResult? Function(String error)? failed,
|
||||
}) {
|
||||
return failed?.call(error);
|
||||
}
|
||||
@@ -667,10 +664,10 @@ class _$Failed extends Failed {
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
TResult? mapOrNull<TResult extends Object?>({
|
||||
TResult Function(Preparing value)? preparing,
|
||||
TResult Function(InProgress value)? inProgress,
|
||||
TResult Function(Success value)? success,
|
||||
TResult Function(Failed value)? failed,
|
||||
TResult? Function(Preparing value)? preparing,
|
||||
TResult? Function(InProgress value)? inProgress,
|
||||
TResult? Function(Success value)? success,
|
||||
TResult? Function(Failed value)? failed,
|
||||
}) {
|
||||
return failed?.call(this);
|
||||
}
|
||||
|
||||
@@ -38,30 +38,21 @@ ChannelModel _$ChannelModelFromJson(Map<String, dynamic> json) => ChannelModel(
|
||||
cooldown: json['cooldown'] as int? ?? 0,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$ChannelModelToJson(ChannelModel instance) {
|
||||
final val = <String, dynamic>{
|
||||
'id': instance.id,
|
||||
'type': instance.type,
|
||||
};
|
||||
|
||||
void writeNotNull(String key, dynamic value) {
|
||||
if (value != null) {
|
||||
val[key] = value;
|
||||
}
|
||||
}
|
||||
|
||||
writeNotNull('cid', readonly(instance.cid));
|
||||
writeNotNull('own_capabilities', readonly(instance.ownCapabilities));
|
||||
writeNotNull('config', readonly(instance.config));
|
||||
writeNotNull('created_by', readonly(instance.createdBy));
|
||||
val['frozen'] = instance.frozen;
|
||||
writeNotNull('last_message_at', readonly(instance.lastMessageAt));
|
||||
writeNotNull('created_at', readonly(instance.createdAt));
|
||||
writeNotNull('updated_at', readonly(instance.updatedAt));
|
||||
writeNotNull('deleted_at', readonly(instance.deletedAt));
|
||||
writeNotNull('member_count', readonly(instance.memberCount));
|
||||
val['cooldown'] = instance.cooldown;
|
||||
val['extra_data'] = instance.extraData;
|
||||
writeNotNull('team', readonly(instance.team));
|
||||
return val;
|
||||
}
|
||||
Map<String, dynamic> _$ChannelModelToJson(ChannelModel instance) =>
|
||||
<String, dynamic>{
|
||||
'id': instance.id,
|
||||
'type': instance.type,
|
||||
'cid': readonly(instance.cid),
|
||||
'own_capabilities': readonly(instance.ownCapabilities),
|
||||
'config': readonly(instance.config),
|
||||
'created_by': readonly(instance.createdBy),
|
||||
'frozen': instance.frozen,
|
||||
'last_message_at': readonly(instance.lastMessageAt),
|
||||
'created_at': readonly(instance.createdAt),
|
||||
'updated_at': readonly(instance.updatedAt),
|
||||
'deleted_at': readonly(instance.deletedAt),
|
||||
'member_count': readonly(instance.memberCount),
|
||||
'cooldown': instance.cooldown,
|
||||
'extra_data': instance.extraData,
|
||||
'team': readonly(instance.team),
|
||||
};
|
||||
|
||||
@@ -75,6 +75,31 @@ Map<String, dynamic> _$MessageToJson(Message instance) {
|
||||
final val = <String, dynamic>{
|
||||
'id': instance.id,
|
||||
'text': instance.text,
|
||||
'type': readonly(instance.type),
|
||||
'attachments': instance.attachments.map((e) => e.toJson()).toList(),
|
||||
'mentioned_users': User.toIds(instance.mentionedUsers),
|
||||
'reaction_counts': readonly(instance.reactionCounts),
|
||||
'reaction_scores': readonly(instance.reactionScores),
|
||||
'latest_reactions': readonly(instance.latestReactions),
|
||||
'own_reactions': readonly(instance.ownReactions),
|
||||
'parent_id': instance.parentId,
|
||||
'quoted_message': readonly(instance.quotedMessage),
|
||||
'quoted_message_id': instance.quotedMessageId,
|
||||
'reply_count': readonly(instance.replyCount),
|
||||
'thread_participants': readonly(instance.threadParticipants),
|
||||
'show_in_channel': instance.showInChannel,
|
||||
'silent': instance.silent,
|
||||
'shadowed': readonly(instance.shadowed),
|
||||
'command': readonly(instance.command),
|
||||
'deleted_at': readonly(instance.deletedAt),
|
||||
'created_at': readonly(instance.createdAt),
|
||||
'updated_at': readonly(instance.updatedAt),
|
||||
'user': readonly(instance.user),
|
||||
'pinned': instance.pinned,
|
||||
'pinned_at': readonly(instance.pinnedAt),
|
||||
'pin_expires': instance.pinExpires?.toIso8601String(),
|
||||
'pinned_by': readonly(instance.pinnedBy),
|
||||
'extra_data': instance.extraData,
|
||||
};
|
||||
|
||||
void writeNotNull(String key, dynamic value) {
|
||||
@@ -83,31 +108,6 @@ Map<String, dynamic> _$MessageToJson(Message instance) {
|
||||
}
|
||||
}
|
||||
|
||||
writeNotNull('type', readonly(instance.type));
|
||||
val['attachments'] = instance.attachments.map((e) => e.toJson()).toList();
|
||||
val['mentioned_users'] = User.toIds(instance.mentionedUsers);
|
||||
writeNotNull('reaction_counts', readonly(instance.reactionCounts));
|
||||
writeNotNull('reaction_scores', readonly(instance.reactionScores));
|
||||
writeNotNull('latest_reactions', readonly(instance.latestReactions));
|
||||
writeNotNull('own_reactions', readonly(instance.ownReactions));
|
||||
val['parent_id'] = instance.parentId;
|
||||
val['quoted_message'] = readonly(instance.quotedMessage);
|
||||
val['quoted_message_id'] = instance.quotedMessageId;
|
||||
writeNotNull('reply_count', readonly(instance.replyCount));
|
||||
writeNotNull('thread_participants', readonly(instance.threadParticipants));
|
||||
val['show_in_channel'] = instance.showInChannel;
|
||||
val['silent'] = instance.silent;
|
||||
writeNotNull('shadowed', readonly(instance.shadowed));
|
||||
writeNotNull('command', readonly(instance.command));
|
||||
writeNotNull('deleted_at', readonly(instance.deletedAt));
|
||||
writeNotNull('created_at', readonly(instance.createdAt));
|
||||
writeNotNull('updated_at', readonly(instance.updatedAt));
|
||||
writeNotNull('user', readonly(instance.user));
|
||||
val['pinned'] = instance.pinned;
|
||||
val['pinned_at'] = readonly(instance.pinnedAt);
|
||||
val['pin_expires'] = instance.pinExpires?.toIso8601String();
|
||||
val['pinned_by'] = readonly(instance.pinnedBy);
|
||||
val['extra_data'] = instance.extraData;
|
||||
writeNotNull('i18n', instance.i18n);
|
||||
return val;
|
||||
}
|
||||
|
||||
@@ -20,22 +20,12 @@ Reaction _$ReactionFromJson(Map<String, dynamic> json) => Reaction(
|
||||
extraData: json['extra_data'] as Map<String, dynamic>? ?? const {},
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$ReactionToJson(Reaction instance) {
|
||||
final val = <String, dynamic>{
|
||||
'message_id': instance.messageId,
|
||||
'type': instance.type,
|
||||
};
|
||||
|
||||
void writeNotNull(String key, dynamic value) {
|
||||
if (value != null) {
|
||||
val[key] = value;
|
||||
}
|
||||
}
|
||||
|
||||
writeNotNull('created_at', readonly(instance.createdAt));
|
||||
writeNotNull('user', readonly(instance.user));
|
||||
val['score'] = instance.score;
|
||||
writeNotNull('user_id', readonly(instance.userId));
|
||||
val['extra_data'] = instance.extraData;
|
||||
return val;
|
||||
}
|
||||
Map<String, dynamic> _$ReactionToJson(Reaction instance) => <String, dynamic>{
|
||||
'message_id': instance.messageId,
|
||||
'type': instance.type,
|
||||
'created_at': readonly(instance.createdAt),
|
||||
'user': readonly(instance.user),
|
||||
'score': instance.score,
|
||||
'user_id': readonly(instance.userId),
|
||||
'extra_data': instance.extraData,
|
||||
};
|
||||
|
||||
@@ -33,6 +33,14 @@ User _$UserFromJson(Map<String, dynamic> json) => User(
|
||||
Map<String, dynamic> _$UserToJson(User instance) {
|
||||
final val = <String, dynamic>{
|
||||
'id': instance.id,
|
||||
'role': readonly(instance.role),
|
||||
'teams': readonly(instance.teams),
|
||||
'created_at': readonly(instance.createdAt),
|
||||
'updated_at': readonly(instance.updatedAt),
|
||||
'last_active': readonly(instance.lastActive),
|
||||
'online': readonly(instance.online),
|
||||
'banned': readonly(instance.banned),
|
||||
'ban_expires': readonly(instance.banExpires),
|
||||
};
|
||||
|
||||
void writeNotNull(String key, dynamic value) {
|
||||
@@ -41,14 +49,6 @@ Map<String, dynamic> _$UserToJson(User instance) {
|
||||
}
|
||||
}
|
||||
|
||||
writeNotNull('role', readonly(instance.role));
|
||||
writeNotNull('teams', readonly(instance.teams));
|
||||
writeNotNull('created_at', readonly(instance.createdAt));
|
||||
writeNotNull('updated_at', readonly(instance.updatedAt));
|
||||
writeNotNull('last_active', readonly(instance.lastActive));
|
||||
writeNotNull('online', readonly(instance.online));
|
||||
writeNotNull('banned', readonly(instance.banned));
|
||||
writeNotNull('ban_expires', readonly(instance.banExpires));
|
||||
writeNotNull('language', instance.language);
|
||||
val['extra_data'] = instance.extraData;
|
||||
return val;
|
||||
|
||||
@@ -9,26 +9,26 @@ environment:
|
||||
sdk: '>=2.17.0 <3.0.0'
|
||||
|
||||
dependencies:
|
||||
async: ^2.5.0
|
||||
collection: ^1.15.0
|
||||
dio: ^4.0.0
|
||||
equatable: ^2.0.0
|
||||
freezed_annotation: ^2.0.3
|
||||
http_parser: ^4.0.0
|
||||
jose: ^0.3.2
|
||||
json_annotation: ^4.5.0
|
||||
logging: ^1.0.1
|
||||
meta: ^1.3.0
|
||||
mime: ^1.0.0
|
||||
async: ^2.10.0
|
||||
collection: ^1.17.0
|
||||
dio: ^5.1.1
|
||||
equatable: ^2.0.5
|
||||
freezed_annotation: ^2.2.0
|
||||
http_parser: ^4.0.2
|
||||
jose: ^0.3.3
|
||||
json_annotation: ^4.8.0
|
||||
logging: ^1.1.1
|
||||
meta: ^1.8.0
|
||||
mime: ^1.0.4
|
||||
rate_limiter: ^1.0.0
|
||||
rxdart: ^0.27.0
|
||||
uuid: ^3.0.4
|
||||
web_socket_channel: ^2.0.0
|
||||
rxdart: ^0.27.7
|
||||
uuid: ^3.0.7
|
||||
web_socket_channel: ^2.3.0
|
||||
|
||||
dev_dependencies:
|
||||
build_runner: ^2.0.1
|
||||
dart_code_metrics: ^4.4.0
|
||||
freezed: ^2.0.3
|
||||
json_serializable: ^6.2.0
|
||||
build_runner: ^2.3.3
|
||||
dart_code_metrics: ^5.7.0
|
||||
freezed: ^2.3.2
|
||||
json_serializable: ^6.6.1
|
||||
mocktail: ^0.3.0
|
||||
test: ^1.17.12
|
||||
test: ^1.24.1
|
||||
|
||||
@@ -19,6 +19,7 @@ version: 1.0.0+1
|
||||
|
||||
environment:
|
||||
sdk: '>=2.17.0 <3.0.0'
|
||||
flutter: ">=1.17.0"
|
||||
|
||||
dependencies:
|
||||
# The following adds the Cupertino Icons font to your application.
|
||||
@@ -27,7 +28,7 @@ dependencies:
|
||||
cupertino_icons: ^1.0.4
|
||||
flutter:
|
||||
sdk: flutter
|
||||
responsive_builder: ^0.4.2
|
||||
responsive_builder: ^0.6.4
|
||||
stream_chat_flutter:
|
||||
path: ../
|
||||
stream_chat_localizations:
|
||||
|
||||
@@ -12,12 +12,11 @@ environment:
|
||||
dependencies:
|
||||
cached_network_image: ^3.0.0
|
||||
chewie: ^1.3.4
|
||||
collection: ^1.15.0
|
||||
collection: ^1.17.0
|
||||
contextmenu: ^3.0.0
|
||||
dart_vlc: ^0.4.0
|
||||
desktop_drop: ^0.4.0
|
||||
diacritic: ^0.1.3
|
||||
dio: ^4.0.6
|
||||
ezanimation: ^0.6.0
|
||||
file_picker: ^5.2.4
|
||||
file_selector: ^0.9.0
|
||||
@@ -25,14 +24,13 @@ dependencies:
|
||||
sdk: flutter
|
||||
flutter_markdown: ^0.6.1
|
||||
flutter_portal: ^1.0.0
|
||||
flutter_svg: ^1.0.1
|
||||
http: ^0.13.4
|
||||
flutter_svg: ^2.0.4
|
||||
http_parser: ^4.0.0
|
||||
image_gallery_saver: ^1.7.1
|
||||
image_picker: ^0.8.2
|
||||
jiffy: ^5.0.0
|
||||
lottie: ^2.0.0
|
||||
meta: ^1.3.0
|
||||
meta: ^1.8.0
|
||||
path_provider: ^2.0.9
|
||||
photo_manager: ^2.5.2
|
||||
photo_view: ^0.14.0
|
||||
@@ -44,7 +42,7 @@ dependencies:
|
||||
thumblr: ^0.0.4
|
||||
url_launcher: ^6.1.0
|
||||
video_player: ^2.4.5
|
||||
video_player_macos: ^1.0.6
|
||||
video_player_macos: ^2.0.1
|
||||
video_thumbnail: ^0.5.0
|
||||
|
||||
flutter:
|
||||
@@ -56,9 +54,9 @@ flutter:
|
||||
uses-material-design: true
|
||||
|
||||
dev_dependencies:
|
||||
dart_code_metrics: ^4.4.0
|
||||
dart_code_metrics: ^5.7.0
|
||||
flutter_test:
|
||||
sdk: flutter
|
||||
golden_toolkit: ^0.13.0
|
||||
golden_toolkit: ^0.15.0
|
||||
mocktail: ^0.3.0
|
||||
path: ^1.8.0
|
||||
path: ^1.8.2
|
||||
|
||||
@@ -19,6 +19,7 @@ version: 1.0.0+1
|
||||
|
||||
environment:
|
||||
sdk: '>=2.17.0 <3.0.0'
|
||||
flutter: ">=1.17.0"
|
||||
|
||||
dependencies:
|
||||
# The following adds the Cupertino Icons font to your application.
|
||||
@@ -27,6 +28,7 @@ dependencies:
|
||||
flutter:
|
||||
sdk: flutter
|
||||
stream_chat_flutter_core: ^5.1.0
|
||||
|
||||
dev_dependencies:
|
||||
flutter_test:
|
||||
sdk: flutter
|
||||
|
||||
@@ -83,7 +83,7 @@ abstract class PagedValueNotifier<Key, Value>
|
||||
|
||||
/// Paged value that can be used with [PagedValueNotifier].
|
||||
@freezed
|
||||
abstract class PagedValue<Key, Value> with _$PagedValue<Key, Value> {
|
||||
class PagedValue<Key, Value> with _$PagedValue<Key, Value> {
|
||||
/// Represents the success state of the [PagedValue]
|
||||
// @Assert(
|
||||
// 'nextPageKey != null',
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// coverage:ignore-file
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target
|
||||
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
|
||||
|
||||
part of 'paged_value_notifier.dart';
|
||||
|
||||
@@ -27,11 +27,11 @@ mixin _$PagedValue<Key, Value> {
|
||||
throw _privateConstructorUsedError;
|
||||
@optionalTypeArgs
|
||||
TResult? whenOrNull<TResult extends Object?>(
|
||||
TResult Function(
|
||||
TResult? Function(
|
||||
List<Value> items, Key? nextPageKey, StreamChatError? error)?
|
||||
$default, {
|
||||
TResult Function()? loading,
|
||||
TResult Function(StreamChatError error)? error,
|
||||
TResult? Function()? loading,
|
||||
TResult? Function(StreamChatError error)? error,
|
||||
}) =>
|
||||
throw _privateConstructorUsedError;
|
||||
@optionalTypeArgs
|
||||
@@ -53,9 +53,9 @@ mixin _$PagedValue<Key, Value> {
|
||||
throw _privateConstructorUsedError;
|
||||
@optionalTypeArgs
|
||||
TResult? mapOrNull<TResult extends Object?>(
|
||||
TResult Function(Success<Key, Value> value)? $default, {
|
||||
TResult Function(Loading<Key, Value> value)? loading,
|
||||
TResult Function(Error<Key, Value> value)? error,
|
||||
TResult? Function(Success<Key, Value> value)? $default, {
|
||||
TResult? Function(Loading<Key, Value> value)? loading,
|
||||
TResult? Function(Error<Key, Value> value)? error,
|
||||
}) =>
|
||||
throw _privateConstructorUsedError;
|
||||
@optionalTypeArgs
|
||||
@@ -72,17 +72,19 @@ mixin _$PagedValue<Key, Value> {
|
||||
abstract class $PagedValueCopyWith<Key, Value, $Res> {
|
||||
factory $PagedValueCopyWith(PagedValue<Key, Value> value,
|
||||
$Res Function(PagedValue<Key, Value>) then) =
|
||||
_$PagedValueCopyWithImpl<Key, Value, $Res>;
|
||||
_$PagedValueCopyWithImpl<Key, Value, $Res, PagedValue<Key, Value>>;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$PagedValueCopyWithImpl<Key, Value, $Res>
|
||||
class _$PagedValueCopyWithImpl<Key, Value, $Res,
|
||||
$Val extends PagedValue<Key, Value>>
|
||||
implements $PagedValueCopyWith<Key, Value, $Res> {
|
||||
_$PagedValueCopyWithImpl(this._value, this._then);
|
||||
|
||||
final PagedValue<Key, Value> _value;
|
||||
// ignore: unused_field
|
||||
final $Res Function(PagedValue<Key, Value>) _then;
|
||||
final $Val _value;
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@@ -90,36 +92,35 @@ abstract class _$$SuccessCopyWith<Key, Value, $Res> {
|
||||
factory _$$SuccessCopyWith(_$Success<Key, Value> value,
|
||||
$Res Function(_$Success<Key, Value>) then) =
|
||||
__$$SuccessCopyWithImpl<Key, Value, $Res>;
|
||||
@useResult
|
||||
$Res call({List<Value> items, Key? nextPageKey, StreamChatError? error});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$SuccessCopyWithImpl<Key, Value, $Res>
|
||||
extends _$PagedValueCopyWithImpl<Key, Value, $Res>
|
||||
extends _$PagedValueCopyWithImpl<Key, Value, $Res, _$Success<Key, Value>>
|
||||
implements _$$SuccessCopyWith<Key, Value, $Res> {
|
||||
__$$SuccessCopyWithImpl(
|
||||
_$Success<Key, Value> _value, $Res Function(_$Success<Key, Value>) _then)
|
||||
: super(_value, (v) => _then(v as _$Success<Key, Value>));
|
||||
|
||||
@override
|
||||
_$Success<Key, Value> get _value => super._value as _$Success<Key, Value>;
|
||||
: super(_value, _then);
|
||||
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? items = freezed,
|
||||
Object? items = null,
|
||||
Object? nextPageKey = freezed,
|
||||
Object? error = freezed,
|
||||
}) {
|
||||
return _then(_$Success<Key, Value>(
|
||||
items: items == freezed
|
||||
items: null == items
|
||||
? _value._items
|
||||
: items // ignore: cast_nullable_to_non_nullable
|
||||
as List<Value>,
|
||||
nextPageKey: nextPageKey == freezed
|
||||
nextPageKey: freezed == nextPageKey
|
||||
? _value.nextPageKey
|
||||
: nextPageKey // ignore: cast_nullable_to_non_nullable
|
||||
as Key?,
|
||||
error: error == freezed
|
||||
error: freezed == error
|
||||
? _value.error
|
||||
: error // ignore: cast_nullable_to_non_nullable
|
||||
as StreamChatError?,
|
||||
@@ -142,6 +143,7 @@ class _$Success<Key, Value> extends Success<Key, Value>
|
||||
/// List with all items loaded so far.
|
||||
@override
|
||||
List<Value> get items {
|
||||
if (_items is EqualUnmodifiableListView) return _items;
|
||||
// ignore: implicit_dynamic_type
|
||||
return EqualUnmodifiableListView(_items);
|
||||
}
|
||||
@@ -177,7 +179,7 @@ class _$Success<Key, Value> extends Success<Key, Value>
|
||||
const DeepCollectionEquality().equals(other._items, _items) &&
|
||||
const DeepCollectionEquality()
|
||||
.equals(other.nextPageKey, nextPageKey) &&
|
||||
const DeepCollectionEquality().equals(other.error, error));
|
||||
(identical(other.error, error) || other.error == error));
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -185,10 +187,11 @@ class _$Success<Key, Value> extends Success<Key, Value>
|
||||
runtimeType,
|
||||
const DeepCollectionEquality().hash(_items),
|
||||
const DeepCollectionEquality().hash(nextPageKey),
|
||||
const DeepCollectionEquality().hash(error));
|
||||
error);
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$SuccessCopyWith<Key, Value, _$Success<Key, Value>> get copyWith =>
|
||||
__$$SuccessCopyWithImpl<Key, Value, _$Success<Key, Value>>(
|
||||
this, _$identity);
|
||||
@@ -208,11 +211,11 @@ class _$Success<Key, Value> extends Success<Key, Value>
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
TResult? whenOrNull<TResult extends Object?>(
|
||||
TResult Function(
|
||||
TResult? Function(
|
||||
List<Value> items, Key? nextPageKey, StreamChatError? error)?
|
||||
$default, {
|
||||
TResult Function()? loading,
|
||||
TResult Function(StreamChatError error)? error,
|
||||
TResult? Function()? loading,
|
||||
TResult? Function(StreamChatError error)? error,
|
||||
}) {
|
||||
return $default?.call(items, nextPageKey, this.error);
|
||||
}
|
||||
@@ -246,9 +249,9 @@ class _$Success<Key, Value> extends Success<Key, Value>
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
TResult? mapOrNull<TResult extends Object?>(
|
||||
TResult Function(Success<Key, Value> value)? $default, {
|
||||
TResult Function(Loading<Key, Value> value)? loading,
|
||||
TResult Function(Error<Key, Value> value)? error,
|
||||
TResult? Function(Success<Key, Value> value)? $default, {
|
||||
TResult? Function(Loading<Key, Value> value)? loading,
|
||||
TResult? Function(Error<Key, Value> value)? error,
|
||||
}) {
|
||||
return $default?.call(this);
|
||||
}
|
||||
@@ -276,13 +279,13 @@ abstract class Success<Key, Value> extends PagedValue<Key, Value> {
|
||||
const Success._() : super._();
|
||||
|
||||
/// List with all items loaded so far.
|
||||
List<Value> get items => throw _privateConstructorUsedError;
|
||||
List<Value> get items;
|
||||
|
||||
/// The key for the next page to be fetched.
|
||||
Key? get nextPageKey => throw _privateConstructorUsedError;
|
||||
Key? get nextPageKey;
|
||||
|
||||
/// The current error, if any.
|
||||
StreamChatError? get error => throw _privateConstructorUsedError;
|
||||
StreamChatError? get error;
|
||||
@JsonKey(ignore: true)
|
||||
_$$SuccessCopyWith<Key, Value, _$Success<Key, Value>> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
@@ -297,14 +300,11 @@ abstract class _$$LoadingCopyWith<Key, Value, $Res> {
|
||||
|
||||
/// @nodoc
|
||||
class __$$LoadingCopyWithImpl<Key, Value, $Res>
|
||||
extends _$PagedValueCopyWithImpl<Key, Value, $Res>
|
||||
extends _$PagedValueCopyWithImpl<Key, Value, $Res, _$Loading<Key, Value>>
|
||||
implements _$$LoadingCopyWith<Key, Value, $Res> {
|
||||
__$$LoadingCopyWithImpl(
|
||||
_$Loading<Key, Value> _value, $Res Function(_$Loading<Key, Value>) _then)
|
||||
: super(_value, (v) => _then(v as _$Loading<Key, Value>));
|
||||
|
||||
@override
|
||||
_$Loading<Key, Value> get _value => super._value as _$Loading<Key, Value>;
|
||||
: super(_value, _then);
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@@ -349,11 +349,11 @@ class _$Loading<Key, Value> extends Loading<Key, Value>
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
TResult? whenOrNull<TResult extends Object?>(
|
||||
TResult Function(
|
||||
TResult? Function(
|
||||
List<Value> items, Key? nextPageKey, StreamChatError? error)?
|
||||
$default, {
|
||||
TResult Function()? loading,
|
||||
TResult Function(StreamChatError error)? error,
|
||||
TResult? Function()? loading,
|
||||
TResult? Function(StreamChatError error)? error,
|
||||
}) {
|
||||
return loading?.call();
|
||||
}
|
||||
@@ -387,9 +387,9 @@ class _$Loading<Key, Value> extends Loading<Key, Value>
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
TResult? mapOrNull<TResult extends Object?>(
|
||||
TResult Function(Success<Key, Value> value)? $default, {
|
||||
TResult Function(Loading<Key, Value> value)? loading,
|
||||
TResult Function(Error<Key, Value> value)? error,
|
||||
TResult? Function(Success<Key, Value> value)? $default, {
|
||||
TResult? Function(Loading<Key, Value> value)? loading,
|
||||
TResult? Function(Error<Key, Value> value)? error,
|
||||
}) {
|
||||
return loading?.call(this);
|
||||
}
|
||||
@@ -419,26 +419,25 @@ abstract class _$$ErrorCopyWith<Key, Value, $Res> {
|
||||
factory _$$ErrorCopyWith(
|
||||
_$Error<Key, Value> value, $Res Function(_$Error<Key, Value>) then) =
|
||||
__$$ErrorCopyWithImpl<Key, Value, $Res>;
|
||||
@useResult
|
||||
$Res call({StreamChatError error});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$ErrorCopyWithImpl<Key, Value, $Res>
|
||||
extends _$PagedValueCopyWithImpl<Key, Value, $Res>
|
||||
extends _$PagedValueCopyWithImpl<Key, Value, $Res, _$Error<Key, Value>>
|
||||
implements _$$ErrorCopyWith<Key, Value, $Res> {
|
||||
__$$ErrorCopyWithImpl(
|
||||
_$Error<Key, Value> _value, $Res Function(_$Error<Key, Value>) _then)
|
||||
: super(_value, (v) => _then(v as _$Error<Key, Value>));
|
||||
|
||||
@override
|
||||
_$Error<Key, Value> get _value => super._value as _$Error<Key, Value>;
|
||||
: super(_value, _then);
|
||||
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? error = freezed,
|
||||
Object? error = null,
|
||||
}) {
|
||||
return _then(_$Error<Key, Value>(
|
||||
error == freezed
|
||||
null == error
|
||||
? _value.error
|
||||
: error // ignore: cast_nullable_to_non_nullable
|
||||
as StreamChatError,
|
||||
@@ -473,15 +472,15 @@ class _$Error<Key, Value> extends Error<Key, Value>
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$Error<Key, Value> &&
|
||||
const DeepCollectionEquality().equals(other.error, error));
|
||||
(identical(other.error, error) || other.error == error));
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode =>
|
||||
Object.hash(runtimeType, const DeepCollectionEquality().hash(error));
|
||||
int get hashCode => Object.hash(runtimeType, error);
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$ErrorCopyWith<Key, Value, _$Error<Key, Value>> get copyWith =>
|
||||
__$$ErrorCopyWithImpl<Key, Value, _$Error<Key, Value>>(this, _$identity);
|
||||
|
||||
@@ -500,11 +499,11 @@ class _$Error<Key, Value> extends Error<Key, Value>
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
TResult? whenOrNull<TResult extends Object?>(
|
||||
TResult Function(
|
||||
TResult? Function(
|
||||
List<Value> items, Key? nextPageKey, StreamChatError? error)?
|
||||
$default, {
|
||||
TResult Function()? loading,
|
||||
TResult Function(StreamChatError error)? error,
|
||||
TResult? Function()? loading,
|
||||
TResult? Function(StreamChatError error)? error,
|
||||
}) {
|
||||
return error?.call(this.error);
|
||||
}
|
||||
@@ -538,9 +537,9 @@ class _$Error<Key, Value> extends Error<Key, Value>
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
TResult? mapOrNull<TResult extends Object?>(
|
||||
TResult Function(Success<Key, Value> value)? $default, {
|
||||
TResult Function(Loading<Key, Value> value)? loading,
|
||||
TResult Function(Error<Key, Value> value)? error,
|
||||
TResult? Function(Success<Key, Value> value)? $default, {
|
||||
TResult? Function(Loading<Key, Value> value)? loading,
|
||||
TResult? Function(Error<Key, Value> value)? error,
|
||||
}) {
|
||||
return error?.call(this);
|
||||
}
|
||||
@@ -564,7 +563,7 @@ abstract class Error<Key, Value> extends PagedValue<Key, Value> {
|
||||
const factory Error(final StreamChatError error) = _$Error<Key, Value>;
|
||||
const Error._() : super._();
|
||||
|
||||
StreamChatError get error => throw _privateConstructorUsedError;
|
||||
StreamChatError get error;
|
||||
@JsonKey(ignore: true)
|
||||
_$$ErrorCopyWith<Key, Value, _$Error<Key, Value>> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
|
||||
@@ -425,8 +425,8 @@ class StreamChannelState extends State<StreamChannel> {
|
||||
var message = snapshot.error.toString();
|
||||
if (snapshot.error is DioError) {
|
||||
final dioError = snapshot.error as DioError?;
|
||||
if (dioError?.type == DioErrorType.response) {
|
||||
message = dioError!.message;
|
||||
if (dioError?.type == DioErrorType.badResponse) {
|
||||
message = dioError!.message ?? 'Bad response';
|
||||
} else {
|
||||
message = 'Check your connection and retry';
|
||||
}
|
||||
|
||||
@@ -10,20 +10,21 @@ environment:
|
||||
flutter: ">=1.17.0"
|
||||
|
||||
dependencies:
|
||||
collection: ^1.15.0
|
||||
collection: ^1.17.0
|
||||
connectivity_plus: ^3.0.2
|
||||
flutter:
|
||||
sdk: flutter
|
||||
freezed_annotation: ^2.0.3
|
||||
meta: ^1.3.0
|
||||
meta: ^1.8.0
|
||||
rxdart: ^0.27.0
|
||||
stream_chat: ^5.3.0
|
||||
|
||||
dev_dependencies:
|
||||
build_runner: ^2.0.1
|
||||
dart_code_metrics: ^4.4.0
|
||||
build_runner: ^2.3.3
|
||||
dart_code_metrics: ^5.7.0
|
||||
fake_async: ^1.2.0
|
||||
flutter_test:
|
||||
sdk: flutter
|
||||
freezed: ^2.0.3
|
||||
freezed: ^2.3.2
|
||||
mocktail: ^0.3.0
|
||||
|
||||
|
||||
@@ -92,7 +92,7 @@ void main() {
|
||||
|
||||
const errorMessage = 'Error! Error! Error!';
|
||||
final error = DioError(
|
||||
type: DioErrorType.response,
|
||||
type: DioErrorType.badResponse,
|
||||
error: errorMessage,
|
||||
requestOptions: RequestOptions(path: ''),
|
||||
);
|
||||
|
||||
@@ -15,6 +15,7 @@ dependencies:
|
||||
flutter_localizations:
|
||||
sdk: flutter
|
||||
stream_chat_flutter: ^5.3.0
|
||||
|
||||
dev_dependencies:
|
||||
dart_code_metrics: ^4.16.0
|
||||
flutter_test:
|
||||
|
||||
@@ -6,6 +6,7 @@ version: 1.0.0+1
|
||||
|
||||
environment:
|
||||
sdk: '>=2.17.0 <3.0.0'
|
||||
flutter: ">=1.17.0"
|
||||
|
||||
dependencies:
|
||||
cupertino_icons: ^1.0.3
|
||||
@@ -13,6 +14,7 @@ dependencies:
|
||||
sdk: flutter
|
||||
stream_chat: ^5.1.0
|
||||
stream_chat_persistence: ^5.1.0
|
||||
|
||||
dev_dependencies:
|
||||
flutter_test:
|
||||
sdk: flutter
|
||||
|
||||
@@ -10,20 +10,21 @@ environment:
|
||||
flutter: ">=1.17.0"
|
||||
|
||||
dependencies:
|
||||
drift: ^1.5.0
|
||||
drift: ^1.7.1
|
||||
flutter:
|
||||
sdk: flutter
|
||||
logging: ^1.0.1
|
||||
meta: ^1.3.0
|
||||
meta: ^1.8.0
|
||||
mutex: ^3.0.0
|
||||
path: ^1.8.0
|
||||
path: ^1.8.2
|
||||
path_provider: ^2.0.1
|
||||
sqlite3_flutter_libs: ^0.5.0
|
||||
stream_chat: ^5.1.0
|
||||
|
||||
dev_dependencies:
|
||||
build_runner: ^2.0.1
|
||||
dart_code_metrics: ^4.4.0
|
||||
drift_dev: ^1.5.2
|
||||
build_runner: ^2.3.3
|
||||
dart_code_metrics: ^4.18.0
|
||||
drift_dev: ^1.7.1
|
||||
flutter_test:
|
||||
sdk: flutter
|
||||
mocktail: ^0.3.0
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
name: stream_chat_flutter_workspace
|
||||
|
||||
environment:
|
||||
sdk: '>=2.18.0 <3.0.0'
|
||||
|
||||
dev_dependencies:
|
||||
melos: ^3.0.0
|
||||
Reference in New Issue
Block a user