forked from eatvio/eatvio_app
260 lines
8.5 KiB
Dart
260 lines
8.5 KiB
Dart
// 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, unnecessary_question_mark
|
|
|
|
part of 'chat_message_model.dart';
|
|
|
|
// **************************************************************************
|
|
// FreezedGenerator
|
|
// **************************************************************************
|
|
|
|
T _$identity<T>(T value) => value;
|
|
|
|
final _privateConstructorUsedError = UnsupportedError(
|
|
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');
|
|
|
|
ChatMessageModel _$ChatMessageModelFromJson(Map<String, dynamic> json) {
|
|
return _ChatMessageModel.fromJson(json);
|
|
}
|
|
|
|
/// @nodoc
|
|
mixin _$ChatMessageModel {
|
|
int get id => throw _privateConstructorUsedError;
|
|
String get data => throw _privateConstructorUsedError;
|
|
@JsonKey(name: 'media_data')
|
|
List<dynamic>? get mediaData => throw _privateConstructorUsedError;
|
|
@JsonKey(name: 'author_id')
|
|
int get authorId => throw _privateConstructorUsedError;
|
|
@JsonKey(name: 'updated_at')
|
|
String get updatedAt => throw _privateConstructorUsedError;
|
|
|
|
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
|
@JsonKey(ignore: true)
|
|
$ChatMessageModelCopyWith<ChatMessageModel> get copyWith =>
|
|
throw _privateConstructorUsedError;
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract class $ChatMessageModelCopyWith<$Res> {
|
|
factory $ChatMessageModelCopyWith(
|
|
ChatMessageModel value, $Res Function(ChatMessageModel) then) =
|
|
_$ChatMessageModelCopyWithImpl<$Res, ChatMessageModel>;
|
|
@useResult
|
|
$Res call(
|
|
{int id,
|
|
String data,
|
|
@JsonKey(name: 'media_data') List<dynamic>? mediaData,
|
|
@JsonKey(name: 'author_id') int authorId,
|
|
@JsonKey(name: 'updated_at') String updatedAt});
|
|
}
|
|
|
|
/// @nodoc
|
|
class _$ChatMessageModelCopyWithImpl<$Res, $Val extends ChatMessageModel>
|
|
implements $ChatMessageModelCopyWith<$Res> {
|
|
_$ChatMessageModelCopyWithImpl(this._value, this._then);
|
|
|
|
// ignore: unused_field
|
|
final $Val _value;
|
|
// ignore: unused_field
|
|
final $Res Function($Val) _then;
|
|
|
|
@pragma('vm:prefer-inline')
|
|
@override
|
|
$Res call({
|
|
Object? id = null,
|
|
Object? data = null,
|
|
Object? mediaData = freezed,
|
|
Object? authorId = null,
|
|
Object? updatedAt = null,
|
|
}) {
|
|
return _then(_value.copyWith(
|
|
id: null == id
|
|
? _value.id
|
|
: id // ignore: cast_nullable_to_non_nullable
|
|
as int,
|
|
data: null == data
|
|
? _value.data
|
|
: data // ignore: cast_nullable_to_non_nullable
|
|
as String,
|
|
mediaData: freezed == mediaData
|
|
? _value.mediaData
|
|
: mediaData // ignore: cast_nullable_to_non_nullable
|
|
as List<dynamic>?,
|
|
authorId: null == authorId
|
|
? _value.authorId
|
|
: authorId // ignore: cast_nullable_to_non_nullable
|
|
as int,
|
|
updatedAt: null == updatedAt
|
|
? _value.updatedAt
|
|
: updatedAt // ignore: cast_nullable_to_non_nullable
|
|
as String,
|
|
) as $Val);
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract class _$$ChatMessageModelImplCopyWith<$Res>
|
|
implements $ChatMessageModelCopyWith<$Res> {
|
|
factory _$$ChatMessageModelImplCopyWith(_$ChatMessageModelImpl value,
|
|
$Res Function(_$ChatMessageModelImpl) then) =
|
|
__$$ChatMessageModelImplCopyWithImpl<$Res>;
|
|
@override
|
|
@useResult
|
|
$Res call(
|
|
{int id,
|
|
String data,
|
|
@JsonKey(name: 'media_data') List<dynamic>? mediaData,
|
|
@JsonKey(name: 'author_id') int authorId,
|
|
@JsonKey(name: 'updated_at') String updatedAt});
|
|
}
|
|
|
|
/// @nodoc
|
|
class __$$ChatMessageModelImplCopyWithImpl<$Res>
|
|
extends _$ChatMessageModelCopyWithImpl<$Res, _$ChatMessageModelImpl>
|
|
implements _$$ChatMessageModelImplCopyWith<$Res> {
|
|
__$$ChatMessageModelImplCopyWithImpl(_$ChatMessageModelImpl _value,
|
|
$Res Function(_$ChatMessageModelImpl) _then)
|
|
: super(_value, _then);
|
|
|
|
@pragma('vm:prefer-inline')
|
|
@override
|
|
$Res call({
|
|
Object? id = null,
|
|
Object? data = null,
|
|
Object? mediaData = freezed,
|
|
Object? authorId = null,
|
|
Object? updatedAt = null,
|
|
}) {
|
|
return _then(_$ChatMessageModelImpl(
|
|
id: null == id
|
|
? _value.id
|
|
: id // ignore: cast_nullable_to_non_nullable
|
|
as int,
|
|
data: null == data
|
|
? _value.data
|
|
: data // ignore: cast_nullable_to_non_nullable
|
|
as String,
|
|
mediaData: freezed == mediaData
|
|
? _value._mediaData
|
|
: mediaData // ignore: cast_nullable_to_non_nullable
|
|
as List<dynamic>?,
|
|
authorId: null == authorId
|
|
? _value.authorId
|
|
: authorId // ignore: cast_nullable_to_non_nullable
|
|
as int,
|
|
updatedAt: null == updatedAt
|
|
? _value.updatedAt
|
|
: updatedAt // ignore: cast_nullable_to_non_nullable
|
|
as String,
|
|
));
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
@JsonSerializable()
|
|
class _$ChatMessageModelImpl implements _ChatMessageModel {
|
|
const _$ChatMessageModelImpl(
|
|
{required this.id,
|
|
required this.data,
|
|
@JsonKey(name: 'media_data') required final List<dynamic>? mediaData,
|
|
@JsonKey(name: 'author_id') required this.authorId,
|
|
@JsonKey(name: 'updated_at') required this.updatedAt})
|
|
: _mediaData = mediaData;
|
|
|
|
factory _$ChatMessageModelImpl.fromJson(Map<String, dynamic> json) =>
|
|
_$$ChatMessageModelImplFromJson(json);
|
|
|
|
@override
|
|
final int id;
|
|
@override
|
|
final String data;
|
|
final List<dynamic>? _mediaData;
|
|
@override
|
|
@JsonKey(name: 'media_data')
|
|
List<dynamic>? get mediaData {
|
|
final value = _mediaData;
|
|
if (value == null) return null;
|
|
if (_mediaData is EqualUnmodifiableListView) return _mediaData;
|
|
// ignore: implicit_dynamic_type
|
|
return EqualUnmodifiableListView(value);
|
|
}
|
|
|
|
@override
|
|
@JsonKey(name: 'author_id')
|
|
final int authorId;
|
|
@override
|
|
@JsonKey(name: 'updated_at')
|
|
final String updatedAt;
|
|
|
|
@override
|
|
String toString() {
|
|
return 'ChatMessageModel(id: $id, data: $data, mediaData: $mediaData, authorId: $authorId, updatedAt: $updatedAt)';
|
|
}
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
return identical(this, other) ||
|
|
(other.runtimeType == runtimeType &&
|
|
other is _$ChatMessageModelImpl &&
|
|
(identical(other.id, id) || other.id == id) &&
|
|
(identical(other.data, data) || other.data == data) &&
|
|
const DeepCollectionEquality()
|
|
.equals(other._mediaData, _mediaData) &&
|
|
(identical(other.authorId, authorId) ||
|
|
other.authorId == authorId) &&
|
|
(identical(other.updatedAt, updatedAt) ||
|
|
other.updatedAt == updatedAt));
|
|
}
|
|
|
|
@JsonKey(ignore: true)
|
|
@override
|
|
int get hashCode => Object.hash(runtimeType, id, data,
|
|
const DeepCollectionEquality().hash(_mediaData), authorId, updatedAt);
|
|
|
|
@JsonKey(ignore: true)
|
|
@override
|
|
@pragma('vm:prefer-inline')
|
|
_$$ChatMessageModelImplCopyWith<_$ChatMessageModelImpl> get copyWith =>
|
|
__$$ChatMessageModelImplCopyWithImpl<_$ChatMessageModelImpl>(
|
|
this, _$identity);
|
|
|
|
@override
|
|
Map<String, dynamic> toJson() {
|
|
return _$$ChatMessageModelImplToJson(
|
|
this,
|
|
);
|
|
}
|
|
}
|
|
|
|
abstract class _ChatMessageModel implements ChatMessageModel {
|
|
const factory _ChatMessageModel(
|
|
{required final int id,
|
|
required final String data,
|
|
@JsonKey(name: 'media_data') required final List<dynamic>? mediaData,
|
|
@JsonKey(name: 'author_id') required final int authorId,
|
|
@JsonKey(name: 'updated_at') required final String updatedAt}) =
|
|
_$ChatMessageModelImpl;
|
|
|
|
factory _ChatMessageModel.fromJson(Map<String, dynamic> json) =
|
|
_$ChatMessageModelImpl.fromJson;
|
|
|
|
@override
|
|
int get id;
|
|
@override
|
|
String get data;
|
|
@override
|
|
@JsonKey(name: 'media_data')
|
|
List<dynamic>? get mediaData;
|
|
@override
|
|
@JsonKey(name: 'author_id')
|
|
int get authorId;
|
|
@override
|
|
@JsonKey(name: 'updated_at')
|
|
String get updatedAt;
|
|
@override
|
|
@JsonKey(ignore: true)
|
|
_$$ChatMessageModelImplCopyWith<_$ChatMessageModelImpl> get copyWith =>
|
|
throw _privateConstructorUsedError;
|
|
}
|