|
|
|
|
@@ -22,8 +22,10 @@ CommentModel _$CommentModelFromJson(Map<String, dynamic> json) {
|
|
|
|
|
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;
|
|
|
|
|
|
|
|
|
|
@@ -33,32 +35,28 @@ mixin _$CommentModel {
|
|
|
|
|
/// 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;
|
|
|
|
|
$CommentModelCopyWith<CommentModel> get copyWith => throw _privateConstructorUsedError;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// @nodoc
|
|
|
|
|
abstract class $CommentModelCopyWith<$Res> {
|
|
|
|
|
factory $CommentModelCopyWith(
|
|
|
|
|
CommentModel value, $Res Function(CommentModel) then) =
|
|
|
|
|
_$CommentModelCopyWithImpl<$Res, CommentModel>;
|
|
|
|
|
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});
|
|
|
|
|
$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> {
|
|
|
|
|
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;
|
|
|
|
|
|
|
|
|
|
@@ -109,31 +107,23 @@ class _$CommentModelCopyWithImpl<$Res, $Val extends CommentModel>
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// @nodoc
|
|
|
|
|
abstract class _$$CommentModelImplCopyWith<$Res>
|
|
|
|
|
implements $CommentModelCopyWith<$Res> {
|
|
|
|
|
factory _$$CommentModelImplCopyWith(
|
|
|
|
|
_$CommentModelImpl value, $Res Function(_$CommentModelImpl) then) =
|
|
|
|
|
__$$CommentModelImplCopyWithImpl<$Res>;
|
|
|
|
|
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});
|
|
|
|
|
$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);
|
|
|
|
|
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.
|
|
|
|
|
@@ -165,15 +155,13 @@ class __$$CommentModelImplCopyWithImpl<$Res>
|
|
|
|
|
@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})
|
|
|
|
|
{@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);
|
|
|
|
|
factory _$CommentModelImpl.fromJson(Map<String, dynamic> json) => _$$CommentModelImplFromJson(json);
|
|
|
|
|
|
|
|
|
|
final List<Comment> _data;
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
@JsonKey(name: "data")
|
|
|
|
|
List<Comment> get data {
|
|
|
|
|
@@ -206,16 +194,14 @@ class _$CommentModelImpl implements _CommentModel {
|
|
|
|
|
|
|
|
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
|
|
|
@override
|
|
|
|
|
int get hashCode => Object.hash(
|
|
|
|
|
runtimeType, const DeepCollectionEquality().hash(_data), links, meta);
|
|
|
|
|
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);
|
|
|
|
|
_$$CommentModelImplCopyWith<_$CommentModelImpl> get copyWith => __$$CommentModelImplCopyWithImpl<_$CommentModelImpl>(this, _$identity);
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
Map<String, dynamic> toJson() {
|
|
|
|
|
@@ -231,15 +217,16 @@ abstract class _CommentModel implements CommentModel {
|
|
|
|
|
@JsonKey(name: "links") required final Links links,
|
|
|
|
|
@JsonKey(name: "meta") required final Meta meta}) = _$CommentModelImpl;
|
|
|
|
|
|
|
|
|
|
factory _CommentModel.fromJson(Map<String, dynamic> json) =
|
|
|
|
|
_$CommentModelImpl.fromJson;
|
|
|
|
|
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;
|
|
|
|
|
@@ -248,8 +235,7 @@ abstract class _CommentModel implements CommentModel {
|
|
|
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
|
|
|
@override
|
|
|
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
|
|
|
_$$CommentModelImplCopyWith<_$CommentModelImpl> get copyWith =>
|
|
|
|
|
throw _privateConstructorUsedError;
|
|
|
|
|
_$$CommentModelImplCopyWith<_$CommentModelImpl> get copyWith => throw _privateConstructorUsedError;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Comment _$CommentFromJson(Map<String, dynamic> json) {
|
|
|
|
|
@@ -260,14 +246,19 @@ Comment _$CommentFromJson(Map<String, dynamic> json) {
|
|
|
|
|
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;
|
|
|
|
|
|
|
|
|
|
@@ -282,8 +273,8 @@ mixin _$Comment {
|
|
|
|
|
|
|
|
|
|
/// @nodoc
|
|
|
|
|
abstract class $CommentCopyWith<$Res> {
|
|
|
|
|
factory $CommentCopyWith(Comment value, $Res Function(Comment) then) =
|
|
|
|
|
_$CommentCopyWithImpl<$Res, Comment>;
|
|
|
|
|
factory $CommentCopyWith(Comment value, $Res Function(Comment) then) = _$CommentCopyWithImpl<$Res, Comment>;
|
|
|
|
|
|
|
|
|
|
@useResult
|
|
|
|
|
$Res call(
|
|
|
|
|
{@JsonKey(name: "id") int id,
|
|
|
|
|
@@ -295,12 +286,12 @@ abstract class $CommentCopyWith<$Res> {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// @nodoc
|
|
|
|
|
class _$CommentCopyWithImpl<$Res, $Val extends Comment>
|
|
|
|
|
implements $CommentCopyWith<$Res> {
|
|
|
|
|
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;
|
|
|
|
|
|
|
|
|
|
@@ -347,9 +338,8 @@ class _$CommentCopyWithImpl<$Res, $Val extends Comment>
|
|
|
|
|
|
|
|
|
|
/// @nodoc
|
|
|
|
|
abstract class _$$CommentImplCopyWith<$Res> implements $CommentCopyWith<$Res> {
|
|
|
|
|
factory _$$CommentImplCopyWith(
|
|
|
|
|
_$CommentImpl value, $Res Function(_$CommentImpl) then) =
|
|
|
|
|
__$$CommentImplCopyWithImpl<$Res>;
|
|
|
|
|
factory _$$CommentImplCopyWith(_$CommentImpl value, $Res Function(_$CommentImpl) then) = __$$CommentImplCopyWithImpl<$Res>;
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
@useResult
|
|
|
|
|
$Res call(
|
|
|
|
|
@@ -362,12 +352,8 @@ abstract class _$$CommentImplCopyWith<$Res> implements $CommentCopyWith<$Res> {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// @nodoc
|
|
|
|
|
class __$$CommentImplCopyWithImpl<$Res>
|
|
|
|
|
extends _$CommentCopyWithImpl<$Res, _$CommentImpl>
|
|
|
|
|
implements _$$CommentImplCopyWith<$Res> {
|
|
|
|
|
__$$CommentImplCopyWithImpl(
|
|
|
|
|
_$CommentImpl _value, $Res Function(_$CommentImpl) _then)
|
|
|
|
|
: super(_value, _then);
|
|
|
|
|
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.
|
|
|
|
|
@@ -418,13 +404,11 @@ class _$CommentImpl implements _Comment {
|
|
|
|
|
@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: "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);
|
|
|
|
|
factory _$CommentImpl.fromJson(Map<String, dynamic> json) => _$$CommentImplFromJson(json);
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
@JsonKey(name: "id")
|
|
|
|
|
@@ -439,11 +423,11 @@ class _$CommentImpl implements _Comment {
|
|
|
|
|
@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;
|
|
|
|
|
if (_childrenComments is EqualUnmodifiableListView) return _childrenComments;
|
|
|
|
|
// ignore: implicit_dynamic_type
|
|
|
|
|
return EqualUnmodifiableListView(_childrenComments);
|
|
|
|
|
}
|
|
|
|
|
@@ -463,35 +447,23 @@ class _$CommentImpl implements _Comment {
|
|
|
|
|
(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.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));
|
|
|
|
|
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);
|
|
|
|
|
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);
|
|
|
|
|
_$$CommentImplCopyWith<_$CommentImpl> get copyWith => __$$CommentImplCopyWithImpl<_$CommentImpl>(this, _$identity);
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
Map<String, dynamic> toJson() {
|
|
|
|
|
@@ -503,33 +475,35 @@ class _$CommentImpl implements _Comment {
|
|
|
|
|
|
|
|
|
|
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;
|
|
|
|
|
{@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;
|
|
|
|
|
@@ -538,6 +512,5 @@ abstract class _Comment implements Comment {
|
|
|
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
|
|
|
@override
|
|
|
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
|
|
|
_$$CommentImplCopyWith<_$CommentImpl> get copyWith =>
|
|
|
|
|
throw _privateConstructorUsedError;
|
|
|
|
|
_$$CommentImplCopyWith<_$CommentImpl> get copyWith => throw _privateConstructorUsedError;
|
|
|
|
|
}
|
|
|
|
|
|