forked from eatvio/eatvio_app
578 lines
18 KiB
Dart
578 lines
18 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 'comment_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',
|
|
);
|
|
|
|
CommentModel _$CommentModelFromJson(Map<String, dynamic> json) {
|
|
return _CommentModel.fromJson(json);
|
|
}
|
|
|
|
/// @nodoc
|
|
mixin _$CommentModel {
|
|
@JsonKey(name: "data")
|
|
List<Comment> get data => throw _privateConstructorUsedError;
|
|
@JsonKey(name: "links")
|
|
Links get links => throw _privateConstructorUsedError;
|
|
@JsonKey(name: "meta")
|
|
Meta get meta => throw _privateConstructorUsedError;
|
|
|
|
/// Serializes this CommentModel to a JSON map.
|
|
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
|
|
|
/// Create a copy of CommentModel
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
$CommentModelCopyWith<CommentModel> get copyWith =>
|
|
throw _privateConstructorUsedError;
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract class $CommentModelCopyWith<$Res> {
|
|
factory $CommentModelCopyWith(
|
|
CommentModel value,
|
|
$Res Function(CommentModel) then,
|
|
) = _$CommentModelCopyWithImpl<$Res, CommentModel>;
|
|
@useResult
|
|
$Res call({
|
|
@JsonKey(name: "data") List<Comment> data,
|
|
@JsonKey(name: "links") Links links,
|
|
@JsonKey(name: "meta") Meta meta,
|
|
});
|
|
|
|
$LinksCopyWith<$Res> get links;
|
|
$MetaCopyWith<$Res> get meta;
|
|
}
|
|
|
|
/// @nodoc
|
|
class _$CommentModelCopyWithImpl<$Res, $Val extends CommentModel>
|
|
implements $CommentModelCopyWith<$Res> {
|
|
_$CommentModelCopyWithImpl(this._value, this._then);
|
|
|
|
// ignore: unused_field
|
|
final $Val _value;
|
|
// ignore: unused_field
|
|
final $Res Function($Val) _then;
|
|
|
|
/// Create a copy of CommentModel
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@pragma('vm:prefer-inline')
|
|
@override
|
|
$Res call({Object? data = null, Object? links = null, Object? meta = null}) {
|
|
return _then(
|
|
_value.copyWith(
|
|
data:
|
|
null == data
|
|
? _value.data
|
|
: data // ignore: cast_nullable_to_non_nullable
|
|
as List<Comment>,
|
|
links:
|
|
null == links
|
|
? _value.links
|
|
: links // ignore: cast_nullable_to_non_nullable
|
|
as Links,
|
|
meta:
|
|
null == meta
|
|
? _value.meta
|
|
: meta // ignore: cast_nullable_to_non_nullable
|
|
as Meta,
|
|
)
|
|
as $Val,
|
|
);
|
|
}
|
|
|
|
/// Create a copy of CommentModel
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override
|
|
@pragma('vm:prefer-inline')
|
|
$LinksCopyWith<$Res> get links {
|
|
return $LinksCopyWith<$Res>(_value.links, (value) {
|
|
return _then(_value.copyWith(links: value) as $Val);
|
|
});
|
|
}
|
|
|
|
/// Create a copy of CommentModel
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override
|
|
@pragma('vm:prefer-inline')
|
|
$MetaCopyWith<$Res> get meta {
|
|
return $MetaCopyWith<$Res>(_value.meta, (value) {
|
|
return _then(_value.copyWith(meta: value) as $Val);
|
|
});
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract class _$$CommentModelImplCopyWith<$Res>
|
|
implements $CommentModelCopyWith<$Res> {
|
|
factory _$$CommentModelImplCopyWith(
|
|
_$CommentModelImpl value,
|
|
$Res Function(_$CommentModelImpl) then,
|
|
) = __$$CommentModelImplCopyWithImpl<$Res>;
|
|
@override
|
|
@useResult
|
|
$Res call({
|
|
@JsonKey(name: "data") List<Comment> data,
|
|
@JsonKey(name: "links") Links links,
|
|
@JsonKey(name: "meta") Meta meta,
|
|
});
|
|
|
|
@override
|
|
$LinksCopyWith<$Res> get links;
|
|
@override
|
|
$MetaCopyWith<$Res> get meta;
|
|
}
|
|
|
|
/// @nodoc
|
|
class __$$CommentModelImplCopyWithImpl<$Res>
|
|
extends _$CommentModelCopyWithImpl<$Res, _$CommentModelImpl>
|
|
implements _$$CommentModelImplCopyWith<$Res> {
|
|
__$$CommentModelImplCopyWithImpl(
|
|
_$CommentModelImpl _value,
|
|
$Res Function(_$CommentModelImpl) _then,
|
|
) : super(_value, _then);
|
|
|
|
/// Create a copy of CommentModel
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@pragma('vm:prefer-inline')
|
|
@override
|
|
$Res call({Object? data = null, Object? links = null, Object? meta = null}) {
|
|
return _then(
|
|
_$CommentModelImpl(
|
|
data:
|
|
null == data
|
|
? _value._data
|
|
: data // ignore: cast_nullable_to_non_nullable
|
|
as List<Comment>,
|
|
links:
|
|
null == links
|
|
? _value.links
|
|
: links // ignore: cast_nullable_to_non_nullable
|
|
as Links,
|
|
meta:
|
|
null == meta
|
|
? _value.meta
|
|
: meta // ignore: cast_nullable_to_non_nullable
|
|
as Meta,
|
|
),
|
|
);
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
@JsonSerializable()
|
|
class _$CommentModelImpl implements _CommentModel {
|
|
const _$CommentModelImpl({
|
|
@JsonKey(name: "data") required final List<Comment> data,
|
|
@JsonKey(name: "links") required this.links,
|
|
@JsonKey(name: "meta") required this.meta,
|
|
}) : _data = data;
|
|
|
|
factory _$CommentModelImpl.fromJson(Map<String, dynamic> json) =>
|
|
_$$CommentModelImplFromJson(json);
|
|
|
|
final List<Comment> _data;
|
|
@override
|
|
@JsonKey(name: "data")
|
|
List<Comment> get data {
|
|
if (_data is EqualUnmodifiableListView) return _data;
|
|
// ignore: implicit_dynamic_type
|
|
return EqualUnmodifiableListView(_data);
|
|
}
|
|
|
|
@override
|
|
@JsonKey(name: "links")
|
|
final Links links;
|
|
@override
|
|
@JsonKey(name: "meta")
|
|
final Meta meta;
|
|
|
|
@override
|
|
String toString() {
|
|
return 'CommentModel(data: $data, links: $links, meta: $meta)';
|
|
}
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
return identical(this, other) ||
|
|
(other.runtimeType == runtimeType &&
|
|
other is _$CommentModelImpl &&
|
|
const DeepCollectionEquality().equals(other._data, _data) &&
|
|
(identical(other.links, links) || other.links == links) &&
|
|
(identical(other.meta, meta) || other.meta == meta));
|
|
}
|
|
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@override
|
|
int get hashCode => Object.hash(
|
|
runtimeType,
|
|
const DeepCollectionEquality().hash(_data),
|
|
links,
|
|
meta,
|
|
);
|
|
|
|
/// Create a copy of CommentModel
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@override
|
|
@pragma('vm:prefer-inline')
|
|
_$$CommentModelImplCopyWith<_$CommentModelImpl> get copyWith =>
|
|
__$$CommentModelImplCopyWithImpl<_$CommentModelImpl>(this, _$identity);
|
|
|
|
@override
|
|
Map<String, dynamic> toJson() {
|
|
return _$$CommentModelImplToJson(this);
|
|
}
|
|
}
|
|
|
|
abstract class _CommentModel implements CommentModel {
|
|
const factory _CommentModel({
|
|
@JsonKey(name: "data") required final List<Comment> data,
|
|
@JsonKey(name: "links") required final Links links,
|
|
@JsonKey(name: "meta") required final Meta meta,
|
|
}) = _$CommentModelImpl;
|
|
|
|
factory _CommentModel.fromJson(Map<String, dynamic> json) =
|
|
_$CommentModelImpl.fromJson;
|
|
|
|
@override
|
|
@JsonKey(name: "data")
|
|
List<Comment> get data;
|
|
@override
|
|
@JsonKey(name: "links")
|
|
Links get links;
|
|
@override
|
|
@JsonKey(name: "meta")
|
|
Meta get meta;
|
|
|
|
/// Create a copy of CommentModel
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
_$$CommentModelImplCopyWith<_$CommentModelImpl> get copyWith =>
|
|
throw _privateConstructorUsedError;
|
|
}
|
|
|
|
Comment _$CommentFromJson(Map<String, dynamic> json) {
|
|
return _Comment.fromJson(json);
|
|
}
|
|
|
|
/// @nodoc
|
|
mixin _$Comment {
|
|
@JsonKey(name: "id")
|
|
int get id => throw _privateConstructorUsedError;
|
|
@JsonKey(name: "author_name")
|
|
String get authorName => throw _privateConstructorUsedError;
|
|
@JsonKey(name: "author_profile_icon")
|
|
String get authorProfileIcon => throw _privateConstructorUsedError;
|
|
@JsonKey(name: "body")
|
|
String get body => throw _privateConstructorUsedError;
|
|
@JsonKey(name: "children_comments")
|
|
List<Comment> get childrenComments => throw _privateConstructorUsedError;
|
|
@JsonKey(name: "created_at")
|
|
DateTime get createdAt => throw _privateConstructorUsedError;
|
|
|
|
/// Serializes this Comment to a JSON map.
|
|
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
|
|
|
/// Create a copy of Comment
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
$CommentCopyWith<Comment> get copyWith => throw _privateConstructorUsedError;
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract class $CommentCopyWith<$Res> {
|
|
factory $CommentCopyWith(Comment value, $Res Function(Comment) then) =
|
|
_$CommentCopyWithImpl<$Res, Comment>;
|
|
@useResult
|
|
$Res call({
|
|
@JsonKey(name: "id") int id,
|
|
@JsonKey(name: "author_name") String authorName,
|
|
@JsonKey(name: "author_profile_icon") String authorProfileIcon,
|
|
@JsonKey(name: "body") String body,
|
|
@JsonKey(name: "children_comments") List<Comment> childrenComments,
|
|
@JsonKey(name: "created_at") DateTime createdAt,
|
|
});
|
|
}
|
|
|
|
/// @nodoc
|
|
class _$CommentCopyWithImpl<$Res, $Val extends Comment>
|
|
implements $CommentCopyWith<$Res> {
|
|
_$CommentCopyWithImpl(this._value, this._then);
|
|
|
|
// ignore: unused_field
|
|
final $Val _value;
|
|
// ignore: unused_field
|
|
final $Res Function($Val) _then;
|
|
|
|
/// Create a copy of Comment
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@pragma('vm:prefer-inline')
|
|
@override
|
|
$Res call({
|
|
Object? id = null,
|
|
Object? authorName = null,
|
|
Object? authorProfileIcon = null,
|
|
Object? body = null,
|
|
Object? childrenComments = null,
|
|
Object? createdAt = null,
|
|
}) {
|
|
return _then(
|
|
_value.copyWith(
|
|
id:
|
|
null == id
|
|
? _value.id
|
|
: id // ignore: cast_nullable_to_non_nullable
|
|
as int,
|
|
authorName:
|
|
null == authorName
|
|
? _value.authorName
|
|
: authorName // ignore: cast_nullable_to_non_nullable
|
|
as String,
|
|
authorProfileIcon:
|
|
null == authorProfileIcon
|
|
? _value.authorProfileIcon
|
|
: authorProfileIcon // ignore: cast_nullable_to_non_nullable
|
|
as String,
|
|
body:
|
|
null == body
|
|
? _value.body
|
|
: body // ignore: cast_nullable_to_non_nullable
|
|
as String,
|
|
childrenComments:
|
|
null == childrenComments
|
|
? _value.childrenComments
|
|
: childrenComments // ignore: cast_nullable_to_non_nullable
|
|
as List<Comment>,
|
|
createdAt:
|
|
null == createdAt
|
|
? _value.createdAt
|
|
: createdAt // ignore: cast_nullable_to_non_nullable
|
|
as DateTime,
|
|
)
|
|
as $Val,
|
|
);
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract class _$$CommentImplCopyWith<$Res> implements $CommentCopyWith<$Res> {
|
|
factory _$$CommentImplCopyWith(
|
|
_$CommentImpl value,
|
|
$Res Function(_$CommentImpl) then,
|
|
) = __$$CommentImplCopyWithImpl<$Res>;
|
|
@override
|
|
@useResult
|
|
$Res call({
|
|
@JsonKey(name: "id") int id,
|
|
@JsonKey(name: "author_name") String authorName,
|
|
@JsonKey(name: "author_profile_icon") String authorProfileIcon,
|
|
@JsonKey(name: "body") String body,
|
|
@JsonKey(name: "children_comments") List<Comment> childrenComments,
|
|
@JsonKey(name: "created_at") DateTime createdAt,
|
|
});
|
|
}
|
|
|
|
/// @nodoc
|
|
class __$$CommentImplCopyWithImpl<$Res>
|
|
extends _$CommentCopyWithImpl<$Res, _$CommentImpl>
|
|
implements _$$CommentImplCopyWith<$Res> {
|
|
__$$CommentImplCopyWithImpl(
|
|
_$CommentImpl _value,
|
|
$Res Function(_$CommentImpl) _then,
|
|
) : super(_value, _then);
|
|
|
|
/// Create a copy of Comment
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@pragma('vm:prefer-inline')
|
|
@override
|
|
$Res call({
|
|
Object? id = null,
|
|
Object? authorName = null,
|
|
Object? authorProfileIcon = null,
|
|
Object? body = null,
|
|
Object? childrenComments = null,
|
|
Object? createdAt = null,
|
|
}) {
|
|
return _then(
|
|
_$CommentImpl(
|
|
id:
|
|
null == id
|
|
? _value.id
|
|
: id // ignore: cast_nullable_to_non_nullable
|
|
as int,
|
|
authorName:
|
|
null == authorName
|
|
? _value.authorName
|
|
: authorName // ignore: cast_nullable_to_non_nullable
|
|
as String,
|
|
authorProfileIcon:
|
|
null == authorProfileIcon
|
|
? _value.authorProfileIcon
|
|
: authorProfileIcon // ignore: cast_nullable_to_non_nullable
|
|
as String,
|
|
body:
|
|
null == body
|
|
? _value.body
|
|
: body // ignore: cast_nullable_to_non_nullable
|
|
as String,
|
|
childrenComments:
|
|
null == childrenComments
|
|
? _value._childrenComments
|
|
: childrenComments // ignore: cast_nullable_to_non_nullable
|
|
as List<Comment>,
|
|
createdAt:
|
|
null == createdAt
|
|
? _value.createdAt
|
|
: createdAt // ignore: cast_nullable_to_non_nullable
|
|
as DateTime,
|
|
),
|
|
);
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
@JsonSerializable()
|
|
class _$CommentImpl implements _Comment {
|
|
const _$CommentImpl({
|
|
@JsonKey(name: "id") required this.id,
|
|
@JsonKey(name: "author_name") required this.authorName,
|
|
@JsonKey(name: "author_profile_icon") required this.authorProfileIcon,
|
|
@JsonKey(name: "body") required this.body,
|
|
@JsonKey(name: "children_comments")
|
|
required final List<Comment> childrenComments,
|
|
@JsonKey(name: "created_at") required this.createdAt,
|
|
}) : _childrenComments = childrenComments;
|
|
|
|
factory _$CommentImpl.fromJson(Map<String, dynamic> json) =>
|
|
_$$CommentImplFromJson(json);
|
|
|
|
@override
|
|
@JsonKey(name: "id")
|
|
final int id;
|
|
@override
|
|
@JsonKey(name: "author_name")
|
|
final String authorName;
|
|
@override
|
|
@JsonKey(name: "author_profile_icon")
|
|
final String authorProfileIcon;
|
|
@override
|
|
@JsonKey(name: "body")
|
|
final String body;
|
|
final List<Comment> _childrenComments;
|
|
@override
|
|
@JsonKey(name: "children_comments")
|
|
List<Comment> get childrenComments {
|
|
if (_childrenComments is EqualUnmodifiableListView)
|
|
return _childrenComments;
|
|
// ignore: implicit_dynamic_type
|
|
return EqualUnmodifiableListView(_childrenComments);
|
|
}
|
|
|
|
@override
|
|
@JsonKey(name: "created_at")
|
|
final DateTime createdAt;
|
|
|
|
@override
|
|
String toString() {
|
|
return 'Comment(id: $id, authorName: $authorName, authorProfileIcon: $authorProfileIcon, body: $body, childrenComments: $childrenComments, createdAt: $createdAt)';
|
|
}
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
return identical(this, other) ||
|
|
(other.runtimeType == runtimeType &&
|
|
other is _$CommentImpl &&
|
|
(identical(other.id, id) || other.id == id) &&
|
|
(identical(other.authorName, authorName) ||
|
|
other.authorName == authorName) &&
|
|
(identical(other.authorProfileIcon, authorProfileIcon) ||
|
|
other.authorProfileIcon == authorProfileIcon) &&
|
|
(identical(other.body, body) || other.body == body) &&
|
|
const DeepCollectionEquality().equals(
|
|
other._childrenComments,
|
|
_childrenComments,
|
|
) &&
|
|
(identical(other.createdAt, createdAt) ||
|
|
other.createdAt == createdAt));
|
|
}
|
|
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@override
|
|
int get hashCode => Object.hash(
|
|
runtimeType,
|
|
id,
|
|
authorName,
|
|
authorProfileIcon,
|
|
body,
|
|
const DeepCollectionEquality().hash(_childrenComments),
|
|
createdAt,
|
|
);
|
|
|
|
/// Create a copy of Comment
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@override
|
|
@pragma('vm:prefer-inline')
|
|
_$$CommentImplCopyWith<_$CommentImpl> get copyWith =>
|
|
__$$CommentImplCopyWithImpl<_$CommentImpl>(this, _$identity);
|
|
|
|
@override
|
|
Map<String, dynamic> toJson() {
|
|
return _$$CommentImplToJson(this);
|
|
}
|
|
}
|
|
|
|
abstract class _Comment implements Comment {
|
|
const factory _Comment({
|
|
@JsonKey(name: "id") required final int id,
|
|
@JsonKey(name: "author_name") required final String authorName,
|
|
@JsonKey(name: "author_profile_icon")
|
|
required final String authorProfileIcon,
|
|
@JsonKey(name: "body") required final String body,
|
|
@JsonKey(name: "children_comments")
|
|
required final List<Comment> childrenComments,
|
|
@JsonKey(name: "created_at") required final DateTime createdAt,
|
|
}) = _$CommentImpl;
|
|
|
|
factory _Comment.fromJson(Map<String, dynamic> json) = _$CommentImpl.fromJson;
|
|
|
|
@override
|
|
@JsonKey(name: "id")
|
|
int get id;
|
|
@override
|
|
@JsonKey(name: "author_name")
|
|
String get authorName;
|
|
@override
|
|
@JsonKey(name: "author_profile_icon")
|
|
String get authorProfileIcon;
|
|
@override
|
|
@JsonKey(name: "body")
|
|
String get body;
|
|
@override
|
|
@JsonKey(name: "children_comments")
|
|
List<Comment> get childrenComments;
|
|
@override
|
|
@JsonKey(name: "created_at")
|
|
DateTime get createdAt;
|
|
|
|
/// Create a copy of Comment
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
_$$CommentImplCopyWith<_$CommentImpl> get copyWith =>
|
|
throw _privateConstructorUsedError;
|
|
}
|