feat(llc,core,ui,persistence,localization): update dependencies.
Signed-off-by: xsahil03x <[email protected]>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user