forked from eatvio/eatvio_app
chat has been updated
This commit is contained in:
@@ -12,7 +12,8 @@ part of 'comment_model.dart';
|
||||
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');
|
||||
'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);
|
||||
@@ -40,13 +41,15 @@ mixin _$CommentModel {
|
||||
/// @nodoc
|
||||
abstract class $CommentModelCopyWith<$Res> {
|
||||
factory $CommentModelCopyWith(
|
||||
CommentModel value, $Res Function(CommentModel) then) =
|
||||
_$CommentModelCopyWithImpl<$Res, CommentModel>;
|
||||
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;
|
||||
@@ -66,25 +69,27 @@ class _$CommentModelCopyWithImpl<$Res, $Val extends 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);
|
||||
$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
|
||||
@@ -112,14 +117,16 @@ class _$CommentModelCopyWithImpl<$Res, $Val extends CommentModel>
|
||||
abstract class _$$CommentModelImplCopyWith<$Res>
|
||||
implements $CommentModelCopyWith<$Res> {
|
||||
factory _$$CommentModelImplCopyWith(
|
||||
_$CommentModelImpl value, $Res Function(_$CommentModelImpl) then) =
|
||||
__$$CommentModelImplCopyWithImpl<$Res>;
|
||||
_$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;
|
||||
@@ -132,43 +139,45 @@ class __$$CommentModelImplCopyWithImpl<$Res>
|
||||
extends _$CommentModelCopyWithImpl<$Res, _$CommentModelImpl>
|
||||
implements _$$CommentModelImplCopyWith<$Res> {
|
||||
__$$CommentModelImplCopyWithImpl(
|
||||
_$CommentModelImpl _value, $Res Function(_$CommentModelImpl) _then)
|
||||
: super(_value, _then);
|
||||
_$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,
|
||||
));
|
||||
$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;
|
||||
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);
|
||||
@@ -207,7 +216,11 @@ class _$CommentModelImpl implements _CommentModel {
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(
|
||||
runtimeType, const DeepCollectionEquality().hash(_data), links, meta);
|
||||
runtimeType,
|
||||
const DeepCollectionEquality().hash(_data),
|
||||
links,
|
||||
meta,
|
||||
);
|
||||
|
||||
/// Create a copy of CommentModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -219,17 +232,16 @@ class _$CommentModelImpl implements _CommentModel {
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$$CommentModelImplToJson(
|
||||
this,
|
||||
);
|
||||
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;
|
||||
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;
|
||||
@@ -285,13 +297,14 @@ 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});
|
||||
$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
|
||||
@@ -316,49 +329,60 @@ class _$CommentCopyWithImpl<$Res, $Val extends Comment>
|
||||
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);
|
||||
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>;
|
||||
_$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});
|
||||
$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
|
||||
@@ -366,8 +390,9 @@ class __$$CommentImplCopyWithImpl<$Res>
|
||||
extends _$CommentCopyWithImpl<$Res, _$CommentImpl>
|
||||
implements _$$CommentImplCopyWith<$Res> {
|
||||
__$$CommentImplCopyWithImpl(
|
||||
_$CommentImpl _value, $Res Function(_$CommentImpl) _then)
|
||||
: super(_value, _then);
|
||||
_$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.
|
||||
@@ -381,47 +406,55 @@ class __$$CommentImplCopyWithImpl<$Res>
|
||||
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,
|
||||
));
|
||||
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;
|
||||
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);
|
||||
@@ -468,8 +501,10 @@ class _$CommentImpl implements _Comment {
|
||||
(identical(other.authorProfileIcon, authorProfileIcon) ||
|
||||
other.authorProfileIcon == authorProfileIcon) &&
|
||||
(identical(other.body, body) || other.body == body) &&
|
||||
const DeepCollectionEquality()
|
||||
.equals(other._childrenComments, _childrenComments) &&
|
||||
const DeepCollectionEquality().equals(
|
||||
other._childrenComments,
|
||||
_childrenComments,
|
||||
) &&
|
||||
(identical(other.createdAt, createdAt) ||
|
||||
other.createdAt == createdAt));
|
||||
}
|
||||
@@ -477,13 +512,14 @@ class _$CommentImpl implements _Comment {
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(
|
||||
runtimeType,
|
||||
id,
|
||||
authorName,
|
||||
authorProfileIcon,
|
||||
body,
|
||||
const DeepCollectionEquality().hash(_childrenComments),
|
||||
createdAt);
|
||||
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.
|
||||
@@ -495,23 +531,21 @@ class _$CommentImpl implements _Comment {
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$$CommentImplToJson(
|
||||
this,
|
||||
);
|
||||
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;
|
||||
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;
|
||||
|
||||
|
||||
@@ -8,9 +8,10 @@ part of 'comment_model.dart';
|
||||
|
||||
_$CommentModelImpl _$$CommentModelImplFromJson(Map<String, dynamic> json) =>
|
||||
_$CommentModelImpl(
|
||||
data: (json['data'] as List<dynamic>)
|
||||
.map((e) => Comment.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
data:
|
||||
(json['data'] as List<dynamic>)
|
||||
.map((e) => Comment.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
links: Links.fromJson(json['links'] as Map<String, dynamic>),
|
||||
meta: Meta.fromJson(json['meta'] as Map<String, dynamic>),
|
||||
);
|
||||
@@ -28,9 +29,10 @@ _$CommentImpl _$$CommentImplFromJson(Map<String, dynamic> json) =>
|
||||
authorName: json['author_name'] as String,
|
||||
authorProfileIcon: json['author_profile_icon'] as String,
|
||||
body: json['body'] as String,
|
||||
childrenComments: (json['children_comments'] as List<dynamic>)
|
||||
.map((e) => Comment.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
childrenComments:
|
||||
(json['children_comments'] as List<dynamic>)
|
||||
.map((e) => Comment.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
createdAt: DateTime.parse(json['created_at'] as String),
|
||||
);
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -7,75 +7,87 @@ part of 'diets_pagination_model.dart';
|
||||
// **************************************************************************
|
||||
|
||||
_$DietsPaginationImpl _$$DietsPaginationImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$DietsPaginationImpl(
|
||||
data: (json['data'] as List<dynamic>)
|
||||
Map<String, dynamic> json,
|
||||
) => _$DietsPaginationImpl(
|
||||
data:
|
||||
(json['data'] as List<dynamic>)
|
||||
.map((e) => Diet.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
links: Links.fromJson(json['links'] as Map<String, dynamic>),
|
||||
meta: Meta.fromJson(json['meta'] as Map<String, dynamic>),
|
||||
);
|
||||
links: Links.fromJson(json['links'] as Map<String, dynamic>),
|
||||
meta: Meta.fromJson(json['meta'] as Map<String, dynamic>),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$DietsPaginationImplToJson(
|
||||
_$DietsPaginationImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'data': instance.data,
|
||||
'links': instance.links,
|
||||
'meta': instance.meta,
|
||||
};
|
||||
_$DietsPaginationImpl instance,
|
||||
) => <String, dynamic>{
|
||||
'data': instance.data,
|
||||
'links': instance.links,
|
||||
'meta': instance.meta,
|
||||
};
|
||||
|
||||
_$DietImpl _$$DietImplFromJson(Map<String, dynamic> json) => _$DietImpl(
|
||||
id: (json['id'] as num).toInt(),
|
||||
name: json['name'] as String,
|
||||
image: json['image'] as String,
|
||||
duration: (json['duration'] as num).toInt(),
|
||||
state: $enumDecode(_$DietStateEnumMap, json['state']),
|
||||
type: DietType.fromJson(json['type'] as Map<String, dynamic>),
|
||||
details: json['details'] as String,
|
||||
dailySchedule: (json['daily_schedule'] as Map<String, dynamic>).map(
|
||||
id: (json['id'] as num).toInt(),
|
||||
name: json['name'] as String,
|
||||
image: json['image'] as String,
|
||||
duration: (json['duration'] as num).toInt(),
|
||||
state: $enumDecode(_$DietStateEnumMap, json['state']),
|
||||
type: DietType.fromJson(json['type'] as Map<String, dynamic>),
|
||||
details: json['details'] as String,
|
||||
dailySchedule: (json['daily_schedule'] as Map<String, dynamic>).map(
|
||||
(k, e) => MapEntry(
|
||||
int.parse(k),
|
||||
(e as Map<String, dynamic>).map(
|
||||
(k, e) => MapEntry(
|
||||
int.parse(k),
|
||||
(e as Map<String, dynamic>).map(
|
||||
(k, e) => MapEntry(
|
||||
int.parse(k),
|
||||
(e as Map<String, dynamic>).map(
|
||||
(k, e) => MapEntry(int.parse(k),
|
||||
DailySchedule.fromJson(e as Map<String, dynamic>)),
|
||||
)),
|
||||
)),
|
||||
int.parse(k),
|
||||
(e as Map<String, dynamic>).map(
|
||||
(k, e) => MapEntry(
|
||||
int.parse(k),
|
||||
DailySchedule.fromJson(e as Map<String, dynamic>),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
author: Author.fromJson(json['author'] as Map<String, dynamic>),
|
||||
totalLikes: (json['total_likes'] as num).toInt(),
|
||||
totalViews: (json['total_views'] as num).toInt(),
|
||||
totalComments: (json['total_comments'] as num).toInt(),
|
||||
wasLikedByMe: json['was_liked_by_me'] as bool,
|
||||
isFavorite: json['is_favorite'] as bool,
|
||||
dailyNutrition: (json['daily_nutrition'] as List<dynamic>)
|
||||
),
|
||||
),
|
||||
author: Author.fromJson(json['author'] as Map<String, dynamic>),
|
||||
totalLikes: (json['total_likes'] as num).toInt(),
|
||||
totalViews: (json['total_views'] as num).toInt(),
|
||||
totalComments: (json['total_comments'] as num).toInt(),
|
||||
wasLikedByMe: json['was_liked_by_me'] as bool,
|
||||
isFavorite: json['is_favorite'] as bool,
|
||||
dailyNutrition:
|
||||
(json['daily_nutrition'] as List<dynamic>)
|
||||
.map((e) => DailyNutrition.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
);
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$DietImplToJson(_$DietImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'id': instance.id,
|
||||
'name': instance.name,
|
||||
'image': instance.image,
|
||||
'duration': instance.duration,
|
||||
'state': _$DietStateEnumMap[instance.state]!,
|
||||
'type': instance.type,
|
||||
'details': instance.details,
|
||||
'daily_schedule': instance.dailySchedule.map((k, e) => MapEntry(
|
||||
k.toString(),
|
||||
e.map((k, e) => MapEntry(
|
||||
k.toString(), e.map((k, e) => MapEntry(k.toString(), e)))))),
|
||||
'author': instance.author,
|
||||
'total_likes': instance.totalLikes,
|
||||
'total_views': instance.totalViews,
|
||||
'total_comments': instance.totalComments,
|
||||
'was_liked_by_me': instance.wasLikedByMe,
|
||||
'is_favorite': instance.isFavorite,
|
||||
'daily_nutrition': instance.dailyNutrition,
|
||||
};
|
||||
Map<String, dynamic> _$$DietImplToJson(
|
||||
_$DietImpl instance,
|
||||
) => <String, dynamic>{
|
||||
'id': instance.id,
|
||||
'name': instance.name,
|
||||
'image': instance.image,
|
||||
'duration': instance.duration,
|
||||
'state': _$DietStateEnumMap[instance.state]!,
|
||||
'type': instance.type,
|
||||
'details': instance.details,
|
||||
'daily_schedule': instance.dailySchedule.map(
|
||||
(k, e) => MapEntry(
|
||||
k.toString(),
|
||||
e.map(
|
||||
(k, e) =>
|
||||
MapEntry(k.toString(), e.map((k, e) => MapEntry(k.toString(), e))),
|
||||
),
|
||||
),
|
||||
),
|
||||
'author': instance.author,
|
||||
'total_likes': instance.totalLikes,
|
||||
'total_views': instance.totalViews,
|
||||
'total_comments': instance.totalComments,
|
||||
'was_liked_by_me': instance.wasLikedByMe,
|
||||
'is_favorite': instance.isFavorite,
|
||||
'daily_nutrition': instance.dailyNutrition,
|
||||
};
|
||||
|
||||
const _$DietStateEnumMap = {
|
||||
DietState.active: 'active',
|
||||
@@ -84,23 +96,19 @@ const _$DietStateEnumMap = {
|
||||
};
|
||||
|
||||
_$CreatedDietImpl _$$CreatedDietImplFromJson(Map<String, dynamic> json) =>
|
||||
_$CreatedDietImpl(
|
||||
id: (json['id'] as num).toInt(),
|
||||
);
|
||||
_$CreatedDietImpl(id: (json['id'] as num).toInt());
|
||||
|
||||
Map<String, dynamic> _$$CreatedDietImplToJson(_$CreatedDietImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'id': instance.id,
|
||||
};
|
||||
<String, dynamic>{'id': instance.id};
|
||||
|
||||
_$AuthorImpl _$$AuthorImplFromJson(Map<String, dynamic> json) => _$AuthorImpl(
|
||||
authorSlug: json['author_slug'] as String,
|
||||
authorName: json['author_name'] as String,
|
||||
authorProfileIcon: json['author_profile_icon'] as String,
|
||||
authorIsMe: json['author_is_me'] as bool,
|
||||
isEntitySubscribedByMe: json['is_entity_subscribed_by_me'] as bool?,
|
||||
authorPlaceInRating: (json['author_place_in_rating'] as num?)?.toInt(),
|
||||
);
|
||||
authorSlug: json['author_slug'] as String,
|
||||
authorName: json['author_name'] as String,
|
||||
authorProfileIcon: json['author_profile_icon'] as String,
|
||||
authorIsMe: json['author_is_me'] as bool,
|
||||
isEntitySubscribedByMe: json['is_entity_subscribed_by_me'] as bool?,
|
||||
authorPlaceInRating: (json['author_place_in_rating'] as num?)?.toInt(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$AuthorImplToJson(_$AuthorImpl instance) =>
|
||||
<String, dynamic>{
|
||||
@@ -117,9 +125,12 @@ _$DailyScheduleImpl _$$DailyScheduleImplFromJson(Map<String, dynamic> json) =>
|
||||
name: json['name'] as String,
|
||||
portion: $enumDecode(_$PortionEnumMap, json['portion']),
|
||||
quantity: _parseQuantity(json['quantity']),
|
||||
dailyNutrition: json['nutrition'] == null
|
||||
? null
|
||||
: DailyNutrition.fromJson(json['nutrition'] as Map<String, dynamic>),
|
||||
dailyNutrition:
|
||||
json['nutrition'] == null
|
||||
? null
|
||||
: DailyNutrition.fromJson(
|
||||
json['nutrition'] as Map<String, dynamic>,
|
||||
),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$DailyScheduleImplToJson(_$DailyScheduleImpl instance) =>
|
||||
@@ -162,10 +173,10 @@ _$DailyNutritionImpl _$$DailyNutritionImplFromJson(Map<String, dynamic> json) =>
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$DailyNutritionImplToJson(
|
||||
_$DailyNutritionImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'energy': instance.energy,
|
||||
'proteins': instance.proteins,
|
||||
'fats': instance.fats,
|
||||
'carbohydrates': instance.carbohydrates,
|
||||
};
|
||||
_$DailyNutritionImpl instance,
|
||||
) => <String, dynamic>{
|
||||
'energy': instance.energy,
|
||||
'proteins': instance.proteins,
|
||||
'fats': instance.fats,
|
||||
'carbohydrates': instance.carbohydrates,
|
||||
};
|
||||
|
||||
@@ -12,7 +12,8 @@ part of 'feed_blog_post_model.dart';
|
||||
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');
|
||||
'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',
|
||||
);
|
||||
|
||||
FeedBlogPostModel _$FeedBlogPostModelFromJson(Map<String, dynamic> json) {
|
||||
return _FeedBlogPostModel.fromJson(json);
|
||||
@@ -54,23 +55,25 @@ mixin _$FeedBlogPostModel {
|
||||
/// @nodoc
|
||||
abstract class $FeedBlogPostModelCopyWith<$Res> {
|
||||
factory $FeedBlogPostModelCopyWith(
|
||||
FeedBlogPostModel value, $Res Function(FeedBlogPostModel) then) =
|
||||
_$FeedBlogPostModelCopyWithImpl<$Res, FeedBlogPostModel>;
|
||||
FeedBlogPostModel value,
|
||||
$Res Function(FeedBlogPostModel) then,
|
||||
) = _$FeedBlogPostModelCopyWithImpl<$Res, FeedBlogPostModel>;
|
||||
@useResult
|
||||
$Res call(
|
||||
{int id,
|
||||
String state,
|
||||
String image,
|
||||
String description,
|
||||
Author author,
|
||||
@JsonKey(name: "video_url") String videoUrl,
|
||||
@JsonKey(name: "created_at", fromJson: parseDate) DateTime createdAt,
|
||||
@JsonKey(name: "updated_at", fromJson: parseDate) DateTime updatedAt,
|
||||
String title,
|
||||
@JsonKey(name: "total_likes") int totalLikes,
|
||||
@JsonKey(name: "total_views") int totalViews,
|
||||
@JsonKey(name: "total_comments") int totalComments,
|
||||
@JsonKey(name: "was_liked_by_me") bool wasLikedByMe});
|
||||
$Res call({
|
||||
int id,
|
||||
String state,
|
||||
String image,
|
||||
String description,
|
||||
Author author,
|
||||
@JsonKey(name: "video_url") String videoUrl,
|
||||
@JsonKey(name: "created_at", fromJson: parseDate) DateTime createdAt,
|
||||
@JsonKey(name: "updated_at", fromJson: parseDate) DateTime updatedAt,
|
||||
String title,
|
||||
@JsonKey(name: "total_likes") int totalLikes,
|
||||
@JsonKey(name: "total_views") int totalViews,
|
||||
@JsonKey(name: "total_comments") int totalComments,
|
||||
@JsonKey(name: "was_liked_by_me") bool wasLikedByMe,
|
||||
});
|
||||
|
||||
$AuthorCopyWith<$Res> get author;
|
||||
}
|
||||
@@ -104,60 +107,76 @@ class _$FeedBlogPostModelCopyWithImpl<$Res, $Val extends FeedBlogPostModel>
|
||||
Object? totalComments = null,
|
||||
Object? wasLikedByMe = null,
|
||||
}) {
|
||||
return _then(_value.copyWith(
|
||||
id: null == id
|
||||
? _value.id
|
||||
: id // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
state: null == state
|
||||
? _value.state
|
||||
: state // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
image: null == image
|
||||
? _value.image
|
||||
: image // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
description: null == description
|
||||
? _value.description
|
||||
: description // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
author: null == author
|
||||
? _value.author
|
||||
: author // ignore: cast_nullable_to_non_nullable
|
||||
as Author,
|
||||
videoUrl: null == videoUrl
|
||||
? _value.videoUrl
|
||||
: videoUrl // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
createdAt: null == createdAt
|
||||
? _value.createdAt
|
||||
: createdAt // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime,
|
||||
updatedAt: null == updatedAt
|
||||
? _value.updatedAt
|
||||
: updatedAt // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime,
|
||||
title: null == title
|
||||
? _value.title
|
||||
: title // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
totalLikes: null == totalLikes
|
||||
? _value.totalLikes
|
||||
: totalLikes // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
totalViews: null == totalViews
|
||||
? _value.totalViews
|
||||
: totalViews // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
totalComments: null == totalComments
|
||||
? _value.totalComments
|
||||
: totalComments // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
wasLikedByMe: null == wasLikedByMe
|
||||
? _value.wasLikedByMe
|
||||
: wasLikedByMe // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
) as $Val);
|
||||
return _then(
|
||||
_value.copyWith(
|
||||
id:
|
||||
null == id
|
||||
? _value.id
|
||||
: id // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
state:
|
||||
null == state
|
||||
? _value.state
|
||||
: state // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
image:
|
||||
null == image
|
||||
? _value.image
|
||||
: image // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
description:
|
||||
null == description
|
||||
? _value.description
|
||||
: description // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
author:
|
||||
null == author
|
||||
? _value.author
|
||||
: author // ignore: cast_nullable_to_non_nullable
|
||||
as Author,
|
||||
videoUrl:
|
||||
null == videoUrl
|
||||
? _value.videoUrl
|
||||
: videoUrl // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
createdAt:
|
||||
null == createdAt
|
||||
? _value.createdAt
|
||||
: createdAt // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime,
|
||||
updatedAt:
|
||||
null == updatedAt
|
||||
? _value.updatedAt
|
||||
: updatedAt // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime,
|
||||
title:
|
||||
null == title
|
||||
? _value.title
|
||||
: title // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
totalLikes:
|
||||
null == totalLikes
|
||||
? _value.totalLikes
|
||||
: totalLikes // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
totalViews:
|
||||
null == totalViews
|
||||
? _value.totalViews
|
||||
: totalViews // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
totalComments:
|
||||
null == totalComments
|
||||
? _value.totalComments
|
||||
: totalComments // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
wasLikedByMe:
|
||||
null == wasLikedByMe
|
||||
? _value.wasLikedByMe
|
||||
: wasLikedByMe // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
)
|
||||
as $Val,
|
||||
);
|
||||
}
|
||||
|
||||
/// Create a copy of FeedBlogPostModel
|
||||
@@ -174,25 +193,27 @@ class _$FeedBlogPostModelCopyWithImpl<$Res, $Val extends FeedBlogPostModel>
|
||||
/// @nodoc
|
||||
abstract class _$$FeedBlogPostModelImplCopyWith<$Res>
|
||||
implements $FeedBlogPostModelCopyWith<$Res> {
|
||||
factory _$$FeedBlogPostModelImplCopyWith(_$FeedBlogPostModelImpl value,
|
||||
$Res Function(_$FeedBlogPostModelImpl) then) =
|
||||
__$$FeedBlogPostModelImplCopyWithImpl<$Res>;
|
||||
factory _$$FeedBlogPostModelImplCopyWith(
|
||||
_$FeedBlogPostModelImpl value,
|
||||
$Res Function(_$FeedBlogPostModelImpl) then,
|
||||
) = __$$FeedBlogPostModelImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call(
|
||||
{int id,
|
||||
String state,
|
||||
String image,
|
||||
String description,
|
||||
Author author,
|
||||
@JsonKey(name: "video_url") String videoUrl,
|
||||
@JsonKey(name: "created_at", fromJson: parseDate) DateTime createdAt,
|
||||
@JsonKey(name: "updated_at", fromJson: parseDate) DateTime updatedAt,
|
||||
String title,
|
||||
@JsonKey(name: "total_likes") int totalLikes,
|
||||
@JsonKey(name: "total_views") int totalViews,
|
||||
@JsonKey(name: "total_comments") int totalComments,
|
||||
@JsonKey(name: "was_liked_by_me") bool wasLikedByMe});
|
||||
$Res call({
|
||||
int id,
|
||||
String state,
|
||||
String image,
|
||||
String description,
|
||||
Author author,
|
||||
@JsonKey(name: "video_url") String videoUrl,
|
||||
@JsonKey(name: "created_at", fromJson: parseDate) DateTime createdAt,
|
||||
@JsonKey(name: "updated_at", fromJson: parseDate) DateTime updatedAt,
|
||||
String title,
|
||||
@JsonKey(name: "total_likes") int totalLikes,
|
||||
@JsonKey(name: "total_views") int totalViews,
|
||||
@JsonKey(name: "total_comments") int totalComments,
|
||||
@JsonKey(name: "was_liked_by_me") bool wasLikedByMe,
|
||||
});
|
||||
|
||||
@override
|
||||
$AuthorCopyWith<$Res> get author;
|
||||
@@ -202,9 +223,10 @@ abstract class _$$FeedBlogPostModelImplCopyWith<$Res>
|
||||
class __$$FeedBlogPostModelImplCopyWithImpl<$Res>
|
||||
extends _$FeedBlogPostModelCopyWithImpl<$Res, _$FeedBlogPostModelImpl>
|
||||
implements _$$FeedBlogPostModelImplCopyWith<$Res> {
|
||||
__$$FeedBlogPostModelImplCopyWithImpl(_$FeedBlogPostModelImpl _value,
|
||||
$Res Function(_$FeedBlogPostModelImpl) _then)
|
||||
: super(_value, _then);
|
||||
__$$FeedBlogPostModelImplCopyWithImpl(
|
||||
_$FeedBlogPostModelImpl _value,
|
||||
$Res Function(_$FeedBlogPostModelImpl) _then,
|
||||
) : super(_value, _then);
|
||||
|
||||
/// Create a copy of FeedBlogPostModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -225,80 +247,96 @@ class __$$FeedBlogPostModelImplCopyWithImpl<$Res>
|
||||
Object? totalComments = null,
|
||||
Object? wasLikedByMe = null,
|
||||
}) {
|
||||
return _then(_$FeedBlogPostModelImpl(
|
||||
id: null == id
|
||||
? _value.id
|
||||
: id // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
state: null == state
|
||||
? _value.state
|
||||
: state // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
image: null == image
|
||||
? _value.image
|
||||
: image // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
description: null == description
|
||||
? _value.description
|
||||
: description // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
author: null == author
|
||||
? _value.author
|
||||
: author // ignore: cast_nullable_to_non_nullable
|
||||
as Author,
|
||||
videoUrl: null == videoUrl
|
||||
? _value.videoUrl
|
||||
: videoUrl // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
createdAt: null == createdAt
|
||||
? _value.createdAt
|
||||
: createdAt // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime,
|
||||
updatedAt: null == updatedAt
|
||||
? _value.updatedAt
|
||||
: updatedAt // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime,
|
||||
title: null == title
|
||||
? _value.title
|
||||
: title // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
totalLikes: null == totalLikes
|
||||
? _value.totalLikes
|
||||
: totalLikes // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
totalViews: null == totalViews
|
||||
? _value.totalViews
|
||||
: totalViews // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
totalComments: null == totalComments
|
||||
? _value.totalComments
|
||||
: totalComments // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
wasLikedByMe: null == wasLikedByMe
|
||||
? _value.wasLikedByMe
|
||||
: wasLikedByMe // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
));
|
||||
return _then(
|
||||
_$FeedBlogPostModelImpl(
|
||||
id:
|
||||
null == id
|
||||
? _value.id
|
||||
: id // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
state:
|
||||
null == state
|
||||
? _value.state
|
||||
: state // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
image:
|
||||
null == image
|
||||
? _value.image
|
||||
: image // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
description:
|
||||
null == description
|
||||
? _value.description
|
||||
: description // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
author:
|
||||
null == author
|
||||
? _value.author
|
||||
: author // ignore: cast_nullable_to_non_nullable
|
||||
as Author,
|
||||
videoUrl:
|
||||
null == videoUrl
|
||||
? _value.videoUrl
|
||||
: videoUrl // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
createdAt:
|
||||
null == createdAt
|
||||
? _value.createdAt
|
||||
: createdAt // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime,
|
||||
updatedAt:
|
||||
null == updatedAt
|
||||
? _value.updatedAt
|
||||
: updatedAt // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime,
|
||||
title:
|
||||
null == title
|
||||
? _value.title
|
||||
: title // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
totalLikes:
|
||||
null == totalLikes
|
||||
? _value.totalLikes
|
||||
: totalLikes // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
totalViews:
|
||||
null == totalViews
|
||||
? _value.totalViews
|
||||
: totalViews // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
totalComments:
|
||||
null == totalComments
|
||||
? _value.totalComments
|
||||
: totalComments // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
wasLikedByMe:
|
||||
null == wasLikedByMe
|
||||
? _value.wasLikedByMe
|
||||
: wasLikedByMe // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
class _$FeedBlogPostModelImpl implements _FeedBlogPostModel {
|
||||
const _$FeedBlogPostModelImpl(
|
||||
{required this.id,
|
||||
required this.state,
|
||||
required this.image,
|
||||
required this.description,
|
||||
required this.author,
|
||||
@JsonKey(name: "video_url") required this.videoUrl,
|
||||
@JsonKey(name: "created_at", fromJson: parseDate) required this.createdAt,
|
||||
@JsonKey(name: "updated_at", fromJson: parseDate) required this.updatedAt,
|
||||
required this.title,
|
||||
@JsonKey(name: "total_likes") required this.totalLikes,
|
||||
@JsonKey(name: "total_views") required this.totalViews,
|
||||
@JsonKey(name: "total_comments") required this.totalComments,
|
||||
@JsonKey(name: "was_liked_by_me") required this.wasLikedByMe});
|
||||
const _$FeedBlogPostModelImpl({
|
||||
required this.id,
|
||||
required this.state,
|
||||
required this.image,
|
||||
required this.description,
|
||||
required this.author,
|
||||
@JsonKey(name: "video_url") required this.videoUrl,
|
||||
@JsonKey(name: "created_at", fromJson: parseDate) required this.createdAt,
|
||||
@JsonKey(name: "updated_at", fromJson: parseDate) required this.updatedAt,
|
||||
required this.title,
|
||||
@JsonKey(name: "total_likes") required this.totalLikes,
|
||||
@JsonKey(name: "total_views") required this.totalViews,
|
||||
@JsonKey(name: "total_comments") required this.totalComments,
|
||||
@JsonKey(name: "was_liked_by_me") required this.wasLikedByMe,
|
||||
});
|
||||
|
||||
factory _$FeedBlogPostModelImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$FeedBlogPostModelImplFromJson(json);
|
||||
@@ -373,20 +411,21 @@ class _$FeedBlogPostModelImpl implements _FeedBlogPostModel {
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(
|
||||
runtimeType,
|
||||
id,
|
||||
state,
|
||||
image,
|
||||
description,
|
||||
author,
|
||||
videoUrl,
|
||||
createdAt,
|
||||
updatedAt,
|
||||
title,
|
||||
totalLikes,
|
||||
totalViews,
|
||||
totalComments,
|
||||
wasLikedByMe);
|
||||
runtimeType,
|
||||
id,
|
||||
state,
|
||||
image,
|
||||
description,
|
||||
author,
|
||||
videoUrl,
|
||||
createdAt,
|
||||
updatedAt,
|
||||
title,
|
||||
totalLikes,
|
||||
totalViews,
|
||||
totalComments,
|
||||
wasLikedByMe,
|
||||
);
|
||||
|
||||
/// Create a copy of FeedBlogPostModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -395,34 +434,34 @@ class _$FeedBlogPostModelImpl implements _FeedBlogPostModel {
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$FeedBlogPostModelImplCopyWith<_$FeedBlogPostModelImpl> get copyWith =>
|
||||
__$$FeedBlogPostModelImplCopyWithImpl<_$FeedBlogPostModelImpl>(
|
||||
this, _$identity);
|
||||
this,
|
||||
_$identity,
|
||||
);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$$FeedBlogPostModelImplToJson(
|
||||
this,
|
||||
);
|
||||
return _$$FeedBlogPostModelImplToJson(this);
|
||||
}
|
||||
}
|
||||
|
||||
abstract class _FeedBlogPostModel implements FeedBlogPostModel {
|
||||
const factory _FeedBlogPostModel(
|
||||
{required final int id,
|
||||
required final String state,
|
||||
required final String image,
|
||||
required final String description,
|
||||
required final Author author,
|
||||
@JsonKey(name: "video_url") required final String videoUrl,
|
||||
@JsonKey(name: "created_at", fromJson: parseDate)
|
||||
required final DateTime createdAt,
|
||||
@JsonKey(name: "updated_at", fromJson: parseDate)
|
||||
required final DateTime updatedAt,
|
||||
required final String title,
|
||||
@JsonKey(name: "total_likes") required final int totalLikes,
|
||||
@JsonKey(name: "total_views") required final int totalViews,
|
||||
@JsonKey(name: "total_comments") required final int totalComments,
|
||||
@JsonKey(name: "was_liked_by_me") required final bool wasLikedByMe}) =
|
||||
_$FeedBlogPostModelImpl;
|
||||
const factory _FeedBlogPostModel({
|
||||
required final int id,
|
||||
required final String state,
|
||||
required final String image,
|
||||
required final String description,
|
||||
required final Author author,
|
||||
@JsonKey(name: "video_url") required final String videoUrl,
|
||||
@JsonKey(name: "created_at", fromJson: parseDate)
|
||||
required final DateTime createdAt,
|
||||
@JsonKey(name: "updated_at", fromJson: parseDate)
|
||||
required final DateTime updatedAt,
|
||||
required final String title,
|
||||
@JsonKey(name: "total_likes") required final int totalLikes,
|
||||
@JsonKey(name: "total_views") required final int totalViews,
|
||||
@JsonKey(name: "total_comments") required final int totalComments,
|
||||
@JsonKey(name: "was_liked_by_me") required final bool wasLikedByMe,
|
||||
}) = _$FeedBlogPostModelImpl;
|
||||
|
||||
factory _FeedBlogPostModel.fromJson(Map<String, dynamic> json) =
|
||||
_$FeedBlogPostModelImpl.fromJson;
|
||||
|
||||
@@ -7,37 +7,37 @@ part of 'feed_blog_post_model.dart';
|
||||
// **************************************************************************
|
||||
|
||||
_$FeedBlogPostModelImpl _$$FeedBlogPostModelImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$FeedBlogPostModelImpl(
|
||||
id: (json['id'] as num).toInt(),
|
||||
state: json['state'] as String,
|
||||
image: json['image'] as String,
|
||||
description: json['description'] as String,
|
||||
author: Author.fromJson(json['author'] as Map<String, dynamic>),
|
||||
videoUrl: json['video_url'] as String,
|
||||
createdAt: parseDate(json['created_at'] as String),
|
||||
updatedAt: parseDate(json['updated_at'] as String),
|
||||
title: json['title'] as String,
|
||||
totalLikes: (json['total_likes'] as num).toInt(),
|
||||
totalViews: (json['total_views'] as num).toInt(),
|
||||
totalComments: (json['total_comments'] as num).toInt(),
|
||||
wasLikedByMe: json['was_liked_by_me'] as bool,
|
||||
);
|
||||
Map<String, dynamic> json,
|
||||
) => _$FeedBlogPostModelImpl(
|
||||
id: (json['id'] as num).toInt(),
|
||||
state: json['state'] as String,
|
||||
image: json['image'] as String,
|
||||
description: json['description'] as String,
|
||||
author: Author.fromJson(json['author'] as Map<String, dynamic>),
|
||||
videoUrl: json['video_url'] as String,
|
||||
createdAt: parseDate(json['created_at'] as String),
|
||||
updatedAt: parseDate(json['updated_at'] as String),
|
||||
title: json['title'] as String,
|
||||
totalLikes: (json['total_likes'] as num).toInt(),
|
||||
totalViews: (json['total_views'] as num).toInt(),
|
||||
totalComments: (json['total_comments'] as num).toInt(),
|
||||
wasLikedByMe: json['was_liked_by_me'] as bool,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$FeedBlogPostModelImplToJson(
|
||||
_$FeedBlogPostModelImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'id': instance.id,
|
||||
'state': instance.state,
|
||||
'image': instance.image,
|
||||
'description': instance.description,
|
||||
'author': instance.author,
|
||||
'video_url': instance.videoUrl,
|
||||
'created_at': instance.createdAt.toIso8601String(),
|
||||
'updated_at': instance.updatedAt.toIso8601String(),
|
||||
'title': instance.title,
|
||||
'total_likes': instance.totalLikes,
|
||||
'total_views': instance.totalViews,
|
||||
'total_comments': instance.totalComments,
|
||||
'was_liked_by_me': instance.wasLikedByMe,
|
||||
};
|
||||
_$FeedBlogPostModelImpl instance,
|
||||
) => <String, dynamic>{
|
||||
'id': instance.id,
|
||||
'state': instance.state,
|
||||
'image': instance.image,
|
||||
'description': instance.description,
|
||||
'author': instance.author,
|
||||
'video_url': instance.videoUrl,
|
||||
'created_at': instance.createdAt.toIso8601String(),
|
||||
'updated_at': instance.updatedAt.toIso8601String(),
|
||||
'title': instance.title,
|
||||
'total_likes': instance.totalLikes,
|
||||
'total_views': instance.totalViews,
|
||||
'total_comments': instance.totalComments,
|
||||
'was_liked_by_me': instance.wasLikedByMe,
|
||||
};
|
||||
|
||||
@@ -12,10 +12,12 @@ part of 'feed_blog_post_settings_model.dart';
|
||||
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');
|
||||
'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',
|
||||
);
|
||||
|
||||
FeedBlogPostSettingsModel _$FeedBlogPostSettingsModelFromJson(
|
||||
Map<String, dynamic> json) {
|
||||
Map<String, dynamic> json,
|
||||
) {
|
||||
return _FeedBlogPostSettingsModel.fromJson(json);
|
||||
}
|
||||
|
||||
@@ -38,20 +40,24 @@ mixin _$FeedBlogPostSettingsModel {
|
||||
|
||||
/// @nodoc
|
||||
abstract class $FeedBlogPostSettingsModelCopyWith<$Res> {
|
||||
factory $FeedBlogPostSettingsModelCopyWith(FeedBlogPostSettingsModel value,
|
||||
$Res Function(FeedBlogPostSettingsModel) then) =
|
||||
_$FeedBlogPostSettingsModelCopyWithImpl<$Res, FeedBlogPostSettingsModel>;
|
||||
factory $FeedBlogPostSettingsModelCopyWith(
|
||||
FeedBlogPostSettingsModel value,
|
||||
$Res Function(FeedBlogPostSettingsModel) then,
|
||||
) = _$FeedBlogPostSettingsModelCopyWithImpl<$Res, FeedBlogPostSettingsModel>;
|
||||
@useResult
|
||||
$Res call(
|
||||
{@JsonKey(name: 'data') List<FeedBlogPostModel> feedBlogPostList,
|
||||
Meta meta});
|
||||
$Res call({
|
||||
@JsonKey(name: 'data') List<FeedBlogPostModel> feedBlogPostList,
|
||||
Meta meta,
|
||||
});
|
||||
|
||||
$MetaCopyWith<$Res> get meta;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$FeedBlogPostSettingsModelCopyWithImpl<$Res,
|
||||
$Val extends FeedBlogPostSettingsModel>
|
||||
class _$FeedBlogPostSettingsModelCopyWithImpl<
|
||||
$Res,
|
||||
$Val extends FeedBlogPostSettingsModel
|
||||
>
|
||||
implements $FeedBlogPostSettingsModelCopyWith<$Res> {
|
||||
_$FeedBlogPostSettingsModelCopyWithImpl(this._value, this._then);
|
||||
|
||||
@@ -64,20 +70,22 @@ class _$FeedBlogPostSettingsModelCopyWithImpl<$Res,
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? feedBlogPostList = null,
|
||||
Object? meta = null,
|
||||
}) {
|
||||
return _then(_value.copyWith(
|
||||
feedBlogPostList: null == feedBlogPostList
|
||||
? _value.feedBlogPostList
|
||||
: feedBlogPostList // ignore: cast_nullable_to_non_nullable
|
||||
as List<FeedBlogPostModel>,
|
||||
meta: null == meta
|
||||
? _value.meta
|
||||
: meta // ignore: cast_nullable_to_non_nullable
|
||||
as Meta,
|
||||
) as $Val);
|
||||
$Res call({Object? feedBlogPostList = null, Object? meta = null}) {
|
||||
return _then(
|
||||
_value.copyWith(
|
||||
feedBlogPostList:
|
||||
null == feedBlogPostList
|
||||
? _value.feedBlogPostList
|
||||
: feedBlogPostList // ignore: cast_nullable_to_non_nullable
|
||||
as List<FeedBlogPostModel>,
|
||||
meta:
|
||||
null == meta
|
||||
? _value.meta
|
||||
: meta // ignore: cast_nullable_to_non_nullable
|
||||
as Meta,
|
||||
)
|
||||
as $Val,
|
||||
);
|
||||
}
|
||||
|
||||
/// Create a copy of FeedBlogPostSettingsModel
|
||||
@@ -95,14 +103,15 @@ class _$FeedBlogPostSettingsModelCopyWithImpl<$Res,
|
||||
abstract class _$$FeedBlogPostSettingsModelImplCopyWith<$Res>
|
||||
implements $FeedBlogPostSettingsModelCopyWith<$Res> {
|
||||
factory _$$FeedBlogPostSettingsModelImplCopyWith(
|
||||
_$FeedBlogPostSettingsModelImpl value,
|
||||
$Res Function(_$FeedBlogPostSettingsModelImpl) then) =
|
||||
__$$FeedBlogPostSettingsModelImplCopyWithImpl<$Res>;
|
||||
_$FeedBlogPostSettingsModelImpl value,
|
||||
$Res Function(_$FeedBlogPostSettingsModelImpl) then,
|
||||
) = __$$FeedBlogPostSettingsModelImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call(
|
||||
{@JsonKey(name: 'data') List<FeedBlogPostModel> feedBlogPostList,
|
||||
Meta meta});
|
||||
$Res call({
|
||||
@JsonKey(name: 'data') List<FeedBlogPostModel> feedBlogPostList,
|
||||
Meta meta,
|
||||
});
|
||||
|
||||
@override
|
||||
$MetaCopyWith<$Res> get meta;
|
||||
@@ -110,43 +119,47 @@ abstract class _$$FeedBlogPostSettingsModelImplCopyWith<$Res>
|
||||
|
||||
/// @nodoc
|
||||
class __$$FeedBlogPostSettingsModelImplCopyWithImpl<$Res>
|
||||
extends _$FeedBlogPostSettingsModelCopyWithImpl<$Res,
|
||||
_$FeedBlogPostSettingsModelImpl>
|
||||
extends
|
||||
_$FeedBlogPostSettingsModelCopyWithImpl<
|
||||
$Res,
|
||||
_$FeedBlogPostSettingsModelImpl
|
||||
>
|
||||
implements _$$FeedBlogPostSettingsModelImplCopyWith<$Res> {
|
||||
__$$FeedBlogPostSettingsModelImplCopyWithImpl(
|
||||
_$FeedBlogPostSettingsModelImpl _value,
|
||||
$Res Function(_$FeedBlogPostSettingsModelImpl) _then)
|
||||
: super(_value, _then);
|
||||
_$FeedBlogPostSettingsModelImpl _value,
|
||||
$Res Function(_$FeedBlogPostSettingsModelImpl) _then,
|
||||
) : super(_value, _then);
|
||||
|
||||
/// Create a copy of FeedBlogPostSettingsModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? feedBlogPostList = null,
|
||||
Object? meta = null,
|
||||
}) {
|
||||
return _then(_$FeedBlogPostSettingsModelImpl(
|
||||
feedBlogPostList: null == feedBlogPostList
|
||||
? _value._feedBlogPostList
|
||||
: feedBlogPostList // ignore: cast_nullable_to_non_nullable
|
||||
as List<FeedBlogPostModel>,
|
||||
meta: null == meta
|
||||
? _value.meta
|
||||
: meta // ignore: cast_nullable_to_non_nullable
|
||||
as Meta,
|
||||
));
|
||||
$Res call({Object? feedBlogPostList = null, Object? meta = null}) {
|
||||
return _then(
|
||||
_$FeedBlogPostSettingsModelImpl(
|
||||
feedBlogPostList:
|
||||
null == feedBlogPostList
|
||||
? _value._feedBlogPostList
|
||||
: feedBlogPostList // ignore: cast_nullable_to_non_nullable
|
||||
as List<FeedBlogPostModel>,
|
||||
meta:
|
||||
null == meta
|
||||
? _value.meta
|
||||
: meta // ignore: cast_nullable_to_non_nullable
|
||||
as Meta,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
class _$FeedBlogPostSettingsModelImpl implements _FeedBlogPostSettingsModel {
|
||||
const _$FeedBlogPostSettingsModelImpl(
|
||||
{@JsonKey(name: 'data')
|
||||
required final List<FeedBlogPostModel> feedBlogPostList,
|
||||
required this.meta})
|
||||
: _feedBlogPostList = feedBlogPostList;
|
||||
const _$FeedBlogPostSettingsModelImpl({
|
||||
@JsonKey(name: 'data')
|
||||
required final List<FeedBlogPostModel> feedBlogPostList,
|
||||
required this.meta,
|
||||
}) : _feedBlogPostList = feedBlogPostList;
|
||||
|
||||
factory _$FeedBlogPostSettingsModelImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$FeedBlogPostSettingsModelImplFromJson(json);
|
||||
@@ -174,15 +187,20 @@ class _$FeedBlogPostSettingsModelImpl implements _FeedBlogPostSettingsModel {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$FeedBlogPostSettingsModelImpl &&
|
||||
const DeepCollectionEquality()
|
||||
.equals(other._feedBlogPostList, _feedBlogPostList) &&
|
||||
const DeepCollectionEquality().equals(
|
||||
other._feedBlogPostList,
|
||||
_feedBlogPostList,
|
||||
) &&
|
||||
(identical(other.meta, meta) || other.meta == meta));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,
|
||||
const DeepCollectionEquality().hash(_feedBlogPostList), meta);
|
||||
int get hashCode => Object.hash(
|
||||
runtimeType,
|
||||
const DeepCollectionEquality().hash(_feedBlogPostList),
|
||||
meta,
|
||||
);
|
||||
|
||||
/// Create a copy of FeedBlogPostSettingsModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -190,22 +208,22 @@ class _$FeedBlogPostSettingsModelImpl implements _FeedBlogPostSettingsModel {
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$FeedBlogPostSettingsModelImplCopyWith<_$FeedBlogPostSettingsModelImpl>
|
||||
get copyWith => __$$FeedBlogPostSettingsModelImplCopyWithImpl<
|
||||
_$FeedBlogPostSettingsModelImpl>(this, _$identity);
|
||||
get copyWith => __$$FeedBlogPostSettingsModelImplCopyWithImpl<
|
||||
_$FeedBlogPostSettingsModelImpl
|
||||
>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$$FeedBlogPostSettingsModelImplToJson(
|
||||
this,
|
||||
);
|
||||
return _$$FeedBlogPostSettingsModelImplToJson(this);
|
||||
}
|
||||
}
|
||||
|
||||
abstract class _FeedBlogPostSettingsModel implements FeedBlogPostSettingsModel {
|
||||
const factory _FeedBlogPostSettingsModel(
|
||||
{@JsonKey(name: 'data')
|
||||
required final List<FeedBlogPostModel> feedBlogPostList,
|
||||
required final Meta meta}) = _$FeedBlogPostSettingsModelImpl;
|
||||
const factory _FeedBlogPostSettingsModel({
|
||||
@JsonKey(name: 'data')
|
||||
required final List<FeedBlogPostModel> feedBlogPostList,
|
||||
required final Meta meta,
|
||||
}) = _$FeedBlogPostSettingsModelImpl;
|
||||
|
||||
factory _FeedBlogPostSettingsModel.fromJson(Map<String, dynamic> json) =
|
||||
_$FeedBlogPostSettingsModelImpl.fromJson;
|
||||
@@ -221,5 +239,5 @@ abstract class _FeedBlogPostSettingsModel implements FeedBlogPostSettingsModel {
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$FeedBlogPostSettingsModelImplCopyWith<_$FeedBlogPostSettingsModelImpl>
|
||||
get copyWith => throw _privateConstructorUsedError;
|
||||
get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -7,17 +7,18 @@ part of 'feed_blog_post_settings_model.dart';
|
||||
// **************************************************************************
|
||||
|
||||
_$FeedBlogPostSettingsModelImpl _$$FeedBlogPostSettingsModelImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$FeedBlogPostSettingsModelImpl(
|
||||
feedBlogPostList: (json['data'] as List<dynamic>)
|
||||
Map<String, dynamic> json,
|
||||
) => _$FeedBlogPostSettingsModelImpl(
|
||||
feedBlogPostList:
|
||||
(json['data'] as List<dynamic>)
|
||||
.map((e) => FeedBlogPostModel.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
meta: Meta.fromJson(json['meta'] as Map<String, dynamic>),
|
||||
);
|
||||
meta: Meta.fromJson(json['meta'] as Map<String, dynamic>),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$FeedBlogPostSettingsModelImplToJson(
|
||||
_$FeedBlogPostSettingsModelImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'data': instance.feedBlogPostList,
|
||||
'meta': instance.meta,
|
||||
};
|
||||
_$FeedBlogPostSettingsModelImpl instance,
|
||||
) => <String, dynamic>{
|
||||
'data': instance.feedBlogPostList,
|
||||
'meta': instance.meta,
|
||||
};
|
||||
|
||||
@@ -12,10 +12,12 @@ part of 'feed_consultant_model.dart';
|
||||
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');
|
||||
'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',
|
||||
);
|
||||
|
||||
FeedConsultantPaginationModel _$FeedConsultantPaginationModelFromJson(
|
||||
Map<String, dynamic> json) {
|
||||
Map<String, dynamic> json,
|
||||
) {
|
||||
return _FeedConsultantPaginationModel.fromJson(json);
|
||||
}
|
||||
|
||||
@@ -32,16 +34,19 @@ mixin _$FeedConsultantPaginationModel {
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$FeedConsultantPaginationModelCopyWith<FeedConsultantPaginationModel>
|
||||
get copyWith => throw _privateConstructorUsedError;
|
||||
get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $FeedConsultantPaginationModelCopyWith<$Res> {
|
||||
factory $FeedConsultantPaginationModelCopyWith(
|
||||
FeedConsultantPaginationModel value,
|
||||
$Res Function(FeedConsultantPaginationModel) then) =
|
||||
_$FeedConsultantPaginationModelCopyWithImpl<$Res,
|
||||
FeedConsultantPaginationModel>;
|
||||
FeedConsultantPaginationModel value,
|
||||
$Res Function(FeedConsultantPaginationModel) then,
|
||||
) =
|
||||
_$FeedConsultantPaginationModelCopyWithImpl<
|
||||
$Res,
|
||||
FeedConsultantPaginationModel
|
||||
>;
|
||||
@useResult
|
||||
$Res call({List<FeedConsultantModel> data, Links links, Meta meta});
|
||||
|
||||
@@ -50,8 +55,10 @@ abstract class $FeedConsultantPaginationModelCopyWith<$Res> {
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$FeedConsultantPaginationModelCopyWithImpl<$Res,
|
||||
$Val extends FeedConsultantPaginationModel>
|
||||
class _$FeedConsultantPaginationModelCopyWithImpl<
|
||||
$Res,
|
||||
$Val extends FeedConsultantPaginationModel
|
||||
>
|
||||
implements $FeedConsultantPaginationModelCopyWith<$Res> {
|
||||
_$FeedConsultantPaginationModelCopyWithImpl(this._value, this._then);
|
||||
|
||||
@@ -64,25 +71,27 @@ class _$FeedConsultantPaginationModelCopyWithImpl<$Res,
|
||||
/// 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<FeedConsultantModel>,
|
||||
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);
|
||||
$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<FeedConsultantModel>,
|
||||
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 FeedConsultantPaginationModel
|
||||
@@ -110,9 +119,9 @@ class _$FeedConsultantPaginationModelCopyWithImpl<$Res,
|
||||
abstract class _$$FeedConsultantPaginationModelImplCopyWith<$Res>
|
||||
implements $FeedConsultantPaginationModelCopyWith<$Res> {
|
||||
factory _$$FeedConsultantPaginationModelImplCopyWith(
|
||||
_$FeedConsultantPaginationModelImpl value,
|
||||
$Res Function(_$FeedConsultantPaginationModelImpl) then) =
|
||||
__$$FeedConsultantPaginationModelImplCopyWithImpl<$Res>;
|
||||
_$FeedConsultantPaginationModelImpl value,
|
||||
$Res Function(_$FeedConsultantPaginationModelImpl) then,
|
||||
) = __$$FeedConsultantPaginationModelImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call({List<FeedConsultantModel> data, Links links, Meta meta});
|
||||
@@ -125,37 +134,41 @@ abstract class _$$FeedConsultantPaginationModelImplCopyWith<$Res>
|
||||
|
||||
/// @nodoc
|
||||
class __$$FeedConsultantPaginationModelImplCopyWithImpl<$Res>
|
||||
extends _$FeedConsultantPaginationModelCopyWithImpl<$Res,
|
||||
_$FeedConsultantPaginationModelImpl>
|
||||
extends
|
||||
_$FeedConsultantPaginationModelCopyWithImpl<
|
||||
$Res,
|
||||
_$FeedConsultantPaginationModelImpl
|
||||
>
|
||||
implements _$$FeedConsultantPaginationModelImplCopyWith<$Res> {
|
||||
__$$FeedConsultantPaginationModelImplCopyWithImpl(
|
||||
_$FeedConsultantPaginationModelImpl _value,
|
||||
$Res Function(_$FeedConsultantPaginationModelImpl) _then)
|
||||
: super(_value, _then);
|
||||
_$FeedConsultantPaginationModelImpl _value,
|
||||
$Res Function(_$FeedConsultantPaginationModelImpl) _then,
|
||||
) : super(_value, _then);
|
||||
|
||||
/// Create a copy of FeedConsultantPaginationModel
|
||||
/// 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(_$FeedConsultantPaginationModelImpl(
|
||||
data: null == data
|
||||
? _value._data
|
||||
: data // ignore: cast_nullable_to_non_nullable
|
||||
as List<FeedConsultantModel>,
|
||||
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,
|
||||
));
|
||||
$Res call({Object? data = null, Object? links = null, Object? meta = null}) {
|
||||
return _then(
|
||||
_$FeedConsultantPaginationModelImpl(
|
||||
data:
|
||||
null == data
|
||||
? _value._data
|
||||
: data // ignore: cast_nullable_to_non_nullable
|
||||
as List<FeedConsultantModel>,
|
||||
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,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -163,15 +176,15 @@ class __$$FeedConsultantPaginationModelImplCopyWithImpl<$Res>
|
||||
@JsonSerializable()
|
||||
class _$FeedConsultantPaginationModelImpl
|
||||
implements _FeedConsultantPaginationModel {
|
||||
const _$FeedConsultantPaginationModelImpl(
|
||||
{required final List<FeedConsultantModel> data,
|
||||
required this.links,
|
||||
required this.meta})
|
||||
: _data = data;
|
||||
const _$FeedConsultantPaginationModelImpl({
|
||||
required final List<FeedConsultantModel> data,
|
||||
required this.links,
|
||||
required this.meta,
|
||||
}) : _data = data;
|
||||
|
||||
factory _$FeedConsultantPaginationModelImpl.fromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$$FeedConsultantPaginationModelImplFromJson(json);
|
||||
Map<String, dynamic> json,
|
||||
) => _$$FeedConsultantPaginationModelImplFromJson(json);
|
||||
|
||||
final List<FeedConsultantModel> _data;
|
||||
@override
|
||||
@@ -204,7 +217,11 @@ class _$FeedConsultantPaginationModelImpl
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(
|
||||
runtimeType, const DeepCollectionEquality().hash(_data), links, meta);
|
||||
runtimeType,
|
||||
const DeepCollectionEquality().hash(_data),
|
||||
links,
|
||||
meta,
|
||||
);
|
||||
|
||||
/// Create a copy of FeedConsultantPaginationModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -212,24 +229,25 @@ class _$FeedConsultantPaginationModelImpl
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$FeedConsultantPaginationModelImplCopyWith<
|
||||
_$FeedConsultantPaginationModelImpl>
|
||||
get copyWith => __$$FeedConsultantPaginationModelImplCopyWithImpl<
|
||||
_$FeedConsultantPaginationModelImpl>(this, _$identity);
|
||||
_$FeedConsultantPaginationModelImpl
|
||||
>
|
||||
get copyWith => __$$FeedConsultantPaginationModelImplCopyWithImpl<
|
||||
_$FeedConsultantPaginationModelImpl
|
||||
>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$$FeedConsultantPaginationModelImplToJson(
|
||||
this,
|
||||
);
|
||||
return _$$FeedConsultantPaginationModelImplToJson(this);
|
||||
}
|
||||
}
|
||||
|
||||
abstract class _FeedConsultantPaginationModel
|
||||
implements FeedConsultantPaginationModel {
|
||||
const factory _FeedConsultantPaginationModel(
|
||||
{required final List<FeedConsultantModel> data,
|
||||
required final Links links,
|
||||
required final Meta meta}) = _$FeedConsultantPaginationModelImpl;
|
||||
const factory _FeedConsultantPaginationModel({
|
||||
required final List<FeedConsultantModel> data,
|
||||
required final Links links,
|
||||
required final Meta meta,
|
||||
}) = _$FeedConsultantPaginationModelImpl;
|
||||
|
||||
factory _FeedConsultantPaginationModel.fromJson(Map<String, dynamic> json) =
|
||||
_$FeedConsultantPaginationModelImpl.fromJson;
|
||||
@@ -246,8 +264,9 @@ abstract class _FeedConsultantPaginationModel
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$FeedConsultantPaginationModelImplCopyWith<
|
||||
_$FeedConsultantPaginationModelImpl>
|
||||
get copyWith => throw _privateConstructorUsedError;
|
||||
_$FeedConsultantPaginationModelImpl
|
||||
>
|
||||
get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
FeedConsultantModel _$FeedConsultantModelFromJson(Map<String, dynamic> json) {
|
||||
@@ -281,17 +300,19 @@ mixin _$FeedConsultantModel {
|
||||
/// @nodoc
|
||||
abstract class $FeedConsultantModelCopyWith<$Res> {
|
||||
factory $FeedConsultantModelCopyWith(
|
||||
FeedConsultantModel value, $Res Function(FeedConsultantModel) then) =
|
||||
_$FeedConsultantModelCopyWithImpl<$Res, FeedConsultantModel>;
|
||||
FeedConsultantModel value,
|
||||
$Res Function(FeedConsultantModel) then,
|
||||
) = _$FeedConsultantModelCopyWithImpl<$Res, FeedConsultantModel>;
|
||||
@useResult
|
||||
$Res call(
|
||||
{String slug,
|
||||
String name,
|
||||
@JsonKey(name: 'additional_info') String description,
|
||||
@JsonKey(name: 'rating_place') int? ratingPlace,
|
||||
@JsonKey(name: 'total_scores') int totalScores,
|
||||
@JsonKey(name: 'profile_photo_url') String photo,
|
||||
List<BadgeModel> badges});
|
||||
$Res call({
|
||||
String slug,
|
||||
String name,
|
||||
@JsonKey(name: 'additional_info') String description,
|
||||
@JsonKey(name: 'rating_place') int? ratingPlace,
|
||||
@JsonKey(name: 'total_scores') int totalScores,
|
||||
@JsonKey(name: 'profile_photo_url') String photo,
|
||||
List<BadgeModel> badges,
|
||||
});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@@ -317,64 +338,77 @@ class _$FeedConsultantModelCopyWithImpl<$Res, $Val extends FeedConsultantModel>
|
||||
Object? photo = null,
|
||||
Object? badges = null,
|
||||
}) {
|
||||
return _then(_value.copyWith(
|
||||
slug: null == slug
|
||||
? _value.slug
|
||||
: slug // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
name: null == name
|
||||
? _value.name
|
||||
: name // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
description: null == description
|
||||
? _value.description
|
||||
: description // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
ratingPlace: freezed == ratingPlace
|
||||
? _value.ratingPlace
|
||||
: ratingPlace // ignore: cast_nullable_to_non_nullable
|
||||
as int?,
|
||||
totalScores: null == totalScores
|
||||
? _value.totalScores
|
||||
: totalScores // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
photo: null == photo
|
||||
? _value.photo
|
||||
: photo // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
badges: null == badges
|
||||
? _value.badges
|
||||
: badges // ignore: cast_nullable_to_non_nullable
|
||||
as List<BadgeModel>,
|
||||
) as $Val);
|
||||
return _then(
|
||||
_value.copyWith(
|
||||
slug:
|
||||
null == slug
|
||||
? _value.slug
|
||||
: slug // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
name:
|
||||
null == name
|
||||
? _value.name
|
||||
: name // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
description:
|
||||
null == description
|
||||
? _value.description
|
||||
: description // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
ratingPlace:
|
||||
freezed == ratingPlace
|
||||
? _value.ratingPlace
|
||||
: ratingPlace // ignore: cast_nullable_to_non_nullable
|
||||
as int?,
|
||||
totalScores:
|
||||
null == totalScores
|
||||
? _value.totalScores
|
||||
: totalScores // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
photo:
|
||||
null == photo
|
||||
? _value.photo
|
||||
: photo // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
badges:
|
||||
null == badges
|
||||
? _value.badges
|
||||
: badges // ignore: cast_nullable_to_non_nullable
|
||||
as List<BadgeModel>,
|
||||
)
|
||||
as $Val,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$FeedConsultantModelImplCopyWith<$Res>
|
||||
implements $FeedConsultantModelCopyWith<$Res> {
|
||||
factory _$$FeedConsultantModelImplCopyWith(_$FeedConsultantModelImpl value,
|
||||
$Res Function(_$FeedConsultantModelImpl) then) =
|
||||
__$$FeedConsultantModelImplCopyWithImpl<$Res>;
|
||||
factory _$$FeedConsultantModelImplCopyWith(
|
||||
_$FeedConsultantModelImpl value,
|
||||
$Res Function(_$FeedConsultantModelImpl) then,
|
||||
) = __$$FeedConsultantModelImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call(
|
||||
{String slug,
|
||||
String name,
|
||||
@JsonKey(name: 'additional_info') String description,
|
||||
@JsonKey(name: 'rating_place') int? ratingPlace,
|
||||
@JsonKey(name: 'total_scores') int totalScores,
|
||||
@JsonKey(name: 'profile_photo_url') String photo,
|
||||
List<BadgeModel> badges});
|
||||
$Res call({
|
||||
String slug,
|
||||
String name,
|
||||
@JsonKey(name: 'additional_info') String description,
|
||||
@JsonKey(name: 'rating_place') int? ratingPlace,
|
||||
@JsonKey(name: 'total_scores') int totalScores,
|
||||
@JsonKey(name: 'profile_photo_url') String photo,
|
||||
List<BadgeModel> badges,
|
||||
});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$FeedConsultantModelImplCopyWithImpl<$Res>
|
||||
extends _$FeedConsultantModelCopyWithImpl<$Res, _$FeedConsultantModelImpl>
|
||||
implements _$$FeedConsultantModelImplCopyWith<$Res> {
|
||||
__$$FeedConsultantModelImplCopyWithImpl(_$FeedConsultantModelImpl _value,
|
||||
$Res Function(_$FeedConsultantModelImpl) _then)
|
||||
: super(_value, _then);
|
||||
__$$FeedConsultantModelImplCopyWithImpl(
|
||||
_$FeedConsultantModelImpl _value,
|
||||
$Res Function(_$FeedConsultantModelImpl) _then,
|
||||
) : super(_value, _then);
|
||||
|
||||
/// Create a copy of FeedConsultantModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -389,51 +423,60 @@ class __$$FeedConsultantModelImplCopyWithImpl<$Res>
|
||||
Object? photo = null,
|
||||
Object? badges = null,
|
||||
}) {
|
||||
return _then(_$FeedConsultantModelImpl(
|
||||
slug: null == slug
|
||||
? _value.slug
|
||||
: slug // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
name: null == name
|
||||
? _value.name
|
||||
: name // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
description: null == description
|
||||
? _value.description
|
||||
: description // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
ratingPlace: freezed == ratingPlace
|
||||
? _value.ratingPlace
|
||||
: ratingPlace // ignore: cast_nullable_to_non_nullable
|
||||
as int?,
|
||||
totalScores: null == totalScores
|
||||
? _value.totalScores
|
||||
: totalScores // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
photo: null == photo
|
||||
? _value.photo
|
||||
: photo // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
badges: null == badges
|
||||
? _value._badges
|
||||
: badges // ignore: cast_nullable_to_non_nullable
|
||||
as List<BadgeModel>,
|
||||
));
|
||||
return _then(
|
||||
_$FeedConsultantModelImpl(
|
||||
slug:
|
||||
null == slug
|
||||
? _value.slug
|
||||
: slug // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
name:
|
||||
null == name
|
||||
? _value.name
|
||||
: name // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
description:
|
||||
null == description
|
||||
? _value.description
|
||||
: description // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
ratingPlace:
|
||||
freezed == ratingPlace
|
||||
? _value.ratingPlace
|
||||
: ratingPlace // ignore: cast_nullable_to_non_nullable
|
||||
as int?,
|
||||
totalScores:
|
||||
null == totalScores
|
||||
? _value.totalScores
|
||||
: totalScores // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
photo:
|
||||
null == photo
|
||||
? _value.photo
|
||||
: photo // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
badges:
|
||||
null == badges
|
||||
? _value._badges
|
||||
: badges // ignore: cast_nullable_to_non_nullable
|
||||
as List<BadgeModel>,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
class _$FeedConsultantModelImpl implements _FeedConsultantModel {
|
||||
const _$FeedConsultantModelImpl(
|
||||
{required this.slug,
|
||||
required this.name,
|
||||
@JsonKey(name: 'additional_info') required this.description,
|
||||
@JsonKey(name: 'rating_place') this.ratingPlace,
|
||||
@JsonKey(name: 'total_scores') required this.totalScores,
|
||||
@JsonKey(name: 'profile_photo_url') required this.photo,
|
||||
required final List<BadgeModel> badges})
|
||||
: _badges = badges;
|
||||
const _$FeedConsultantModelImpl({
|
||||
required this.slug,
|
||||
required this.name,
|
||||
@JsonKey(name: 'additional_info') required this.description,
|
||||
@JsonKey(name: 'rating_place') this.ratingPlace,
|
||||
@JsonKey(name: 'total_scores') required this.totalScores,
|
||||
@JsonKey(name: 'profile_photo_url') required this.photo,
|
||||
required final List<BadgeModel> badges,
|
||||
}) : _badges = badges;
|
||||
|
||||
factory _$FeedConsultantModelImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$FeedConsultantModelImplFromJson(json);
|
||||
@@ -487,14 +530,15 @@ class _$FeedConsultantModelImpl implements _FeedConsultantModel {
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(
|
||||
runtimeType,
|
||||
slug,
|
||||
name,
|
||||
description,
|
||||
ratingPlace,
|
||||
totalScores,
|
||||
photo,
|
||||
const DeepCollectionEquality().hash(_badges));
|
||||
runtimeType,
|
||||
slug,
|
||||
name,
|
||||
description,
|
||||
ratingPlace,
|
||||
totalScores,
|
||||
photo,
|
||||
const DeepCollectionEquality().hash(_badges),
|
||||
);
|
||||
|
||||
/// Create a copy of FeedConsultantModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -503,25 +547,26 @@ class _$FeedConsultantModelImpl implements _FeedConsultantModel {
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$FeedConsultantModelImplCopyWith<_$FeedConsultantModelImpl> get copyWith =>
|
||||
__$$FeedConsultantModelImplCopyWithImpl<_$FeedConsultantModelImpl>(
|
||||
this, _$identity);
|
||||
this,
|
||||
_$identity,
|
||||
);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$$FeedConsultantModelImplToJson(
|
||||
this,
|
||||
);
|
||||
return _$$FeedConsultantModelImplToJson(this);
|
||||
}
|
||||
}
|
||||
|
||||
abstract class _FeedConsultantModel implements FeedConsultantModel {
|
||||
const factory _FeedConsultantModel(
|
||||
{required final String slug,
|
||||
required final String name,
|
||||
@JsonKey(name: 'additional_info') required final String description,
|
||||
@JsonKey(name: 'rating_place') final int? ratingPlace,
|
||||
@JsonKey(name: 'total_scores') required final int totalScores,
|
||||
@JsonKey(name: 'profile_photo_url') required final String photo,
|
||||
required final List<BadgeModel> badges}) = _$FeedConsultantModelImpl;
|
||||
const factory _FeedConsultantModel({
|
||||
required final String slug,
|
||||
required final String name,
|
||||
@JsonKey(name: 'additional_info') required final String description,
|
||||
@JsonKey(name: 'rating_place') final int? ratingPlace,
|
||||
@JsonKey(name: 'total_scores') required final int totalScores,
|
||||
@JsonKey(name: 'profile_photo_url') required final String photo,
|
||||
required final List<BadgeModel> badges,
|
||||
}) = _$FeedConsultantModelImpl;
|
||||
|
||||
factory _FeedConsultantModel.fromJson(Map<String, dynamic> json) =
|
||||
_$FeedConsultantModelImpl.fromJson;
|
||||
|
||||
@@ -7,46 +7,49 @@ part of 'feed_consultant_model.dart';
|
||||
// **************************************************************************
|
||||
|
||||
_$FeedConsultantPaginationModelImpl
|
||||
_$$FeedConsultantPaginationModelImplFromJson(Map<String, dynamic> json) =>
|
||||
_$FeedConsultantPaginationModelImpl(
|
||||
data: (json['data'] as List<dynamic>)
|
||||
.map((e) =>
|
||||
FeedConsultantModel.fromJson(e as Map<String, dynamic>))
|
||||
_$$FeedConsultantPaginationModelImplFromJson(Map<String, dynamic> json) =>
|
||||
_$FeedConsultantPaginationModelImpl(
|
||||
data:
|
||||
(json['data'] as List<dynamic>)
|
||||
.map(
|
||||
(e) => FeedConsultantModel.fromJson(e as Map<String, dynamic>),
|
||||
)
|
||||
.toList(),
|
||||
links: Links.fromJson(json['links'] as Map<String, dynamic>),
|
||||
meta: Meta.fromJson(json['meta'] as Map<String, dynamic>),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$FeedConsultantPaginationModelImplToJson(
|
||||
_$FeedConsultantPaginationModelImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'data': instance.data,
|
||||
'links': instance.links,
|
||||
'meta': instance.meta,
|
||||
};
|
||||
|
||||
_$FeedConsultantModelImpl _$$FeedConsultantModelImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$FeedConsultantModelImpl(
|
||||
slug: json['slug'] as String,
|
||||
name: json['name'] as String,
|
||||
description: json['additional_info'] as String,
|
||||
ratingPlace: (json['rating_place'] as num?)?.toInt(),
|
||||
totalScores: (json['total_scores'] as num).toInt(),
|
||||
photo: json['profile_photo_url'] as String,
|
||||
badges: (json['badges'] as List<dynamic>)
|
||||
.map((e) => BadgeModel.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
links: Links.fromJson(json['links'] as Map<String, dynamic>),
|
||||
meta: Meta.fromJson(json['meta'] as Map<String, dynamic>),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$FeedConsultantPaginationModelImplToJson(
|
||||
_$FeedConsultantPaginationModelImpl instance,
|
||||
) => <String, dynamic>{
|
||||
'data': instance.data,
|
||||
'links': instance.links,
|
||||
'meta': instance.meta,
|
||||
};
|
||||
|
||||
_$FeedConsultantModelImpl _$$FeedConsultantModelImplFromJson(
|
||||
Map<String, dynamic> json,
|
||||
) => _$FeedConsultantModelImpl(
|
||||
slug: json['slug'] as String,
|
||||
name: json['name'] as String,
|
||||
description: json['additional_info'] as String,
|
||||
ratingPlace: (json['rating_place'] as num?)?.toInt(),
|
||||
totalScores: (json['total_scores'] as num).toInt(),
|
||||
photo: json['profile_photo_url'] as String,
|
||||
badges:
|
||||
(json['badges'] as List<dynamic>)
|
||||
.map((e) => BadgeModel.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$FeedConsultantModelImplToJson(
|
||||
_$FeedConsultantModelImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'slug': instance.slug,
|
||||
'name': instance.name,
|
||||
'additional_info': instance.description,
|
||||
'rating_place': instance.ratingPlace,
|
||||
'total_scores': instance.totalScores,
|
||||
'profile_photo_url': instance.photo,
|
||||
'badges': instance.badges,
|
||||
};
|
||||
_$FeedConsultantModelImpl instance,
|
||||
) => <String, dynamic>{
|
||||
'slug': instance.slug,
|
||||
'name': instance.name,
|
||||
'additional_info': instance.description,
|
||||
'rating_place': instance.ratingPlace,
|
||||
'total_scores': instance.totalScores,
|
||||
'profile_photo_url': instance.photo,
|
||||
'badges': instance.badges,
|
||||
};
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -7,22 +7,23 @@ part of 'plan_pagination_model.dart';
|
||||
// **************************************************************************
|
||||
|
||||
_$PlanPaginationModelImpl _$$PlanPaginationModelImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$PlanPaginationModelImpl(
|
||||
data: (json['data'] as List<dynamic>)
|
||||
Map<String, dynamic> json,
|
||||
) => _$PlanPaginationModelImpl(
|
||||
data:
|
||||
(json['data'] as List<dynamic>)
|
||||
.map((e) => PlanModel.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
links: Links.fromJson(json['links'] as Map<String, dynamic>),
|
||||
meta: Meta.fromJson(json['meta'] as Map<String, dynamic>),
|
||||
);
|
||||
links: Links.fromJson(json['links'] as Map<String, dynamic>),
|
||||
meta: Meta.fromJson(json['meta'] as Map<String, dynamic>),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$PlanPaginationModelImplToJson(
|
||||
_$PlanPaginationModelImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'data': instance.data,
|
||||
'links': instance.links,
|
||||
'meta': instance.meta,
|
||||
};
|
||||
_$PlanPaginationModelImpl instance,
|
||||
) => <String, dynamic>{
|
||||
'data': instance.data,
|
||||
'links': instance.links,
|
||||
'meta': instance.meta,
|
||||
};
|
||||
|
||||
_$PlanModelImpl _$$PlanModelImplFromJson(Map<String, dynamic> json) =>
|
||||
_$PlanModelImpl(
|
||||
@@ -35,18 +36,24 @@ _$PlanModelImpl _$$PlanModelImplFromJson(Map<String, dynamic> json) =>
|
||||
type: planTypeFromJson(json['type']),
|
||||
details: json['details'] as String,
|
||||
packetsCount: (json['packets_count'] as num).toInt(),
|
||||
packet1Options: json['packet1_options'] == null
|
||||
? null
|
||||
: PacketOptions.fromJson(
|
||||
json['packet1_options'] as Map<String, dynamic>),
|
||||
packet2Options: json['packet2_options'] == null
|
||||
? null
|
||||
: PacketOptions.fromJson(
|
||||
json['packet2_options'] as Map<String, dynamic>),
|
||||
packet3Options: json['packet3_options'] == null
|
||||
? null
|
||||
: PacketOptions.fromJson(
|
||||
json['packet3_options'] as Map<String, dynamic>),
|
||||
packet1Options:
|
||||
json['packet1_options'] == null
|
||||
? null
|
||||
: PacketOptions.fromJson(
|
||||
json['packet1_options'] as Map<String, dynamic>,
|
||||
),
|
||||
packet2Options:
|
||||
json['packet2_options'] == null
|
||||
? null
|
||||
: PacketOptions.fromJson(
|
||||
json['packet2_options'] as Map<String, dynamic>,
|
||||
),
|
||||
packet3Options:
|
||||
json['packet3_options'] == null
|
||||
? null
|
||||
: PacketOptions.fromJson(
|
||||
json['packet3_options'] as Map<String, dynamic>,
|
||||
),
|
||||
author: Author.fromJson(json['author'] as Map<String, dynamic>),
|
||||
totalLikes: (json['total_likes'] as num).toInt(),
|
||||
totalViews: (json['total_views'] as num).toInt(),
|
||||
|
||||
@@ -12,7 +12,8 @@ part of 'recipes_model.dart';
|
||||
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');
|
||||
'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',
|
||||
);
|
||||
|
||||
Recipe _$RecipeFromJson(Map<String, dynamic> json) {
|
||||
return _Recipes.fromJson(json);
|
||||
@@ -67,28 +68,29 @@ abstract class $RecipeCopyWith<$Res> {
|
||||
factory $RecipeCopyWith(Recipe value, $Res Function(Recipe) then) =
|
||||
_$RecipeCopyWithImpl<$Res, Recipe>;
|
||||
@useResult
|
||||
$Res call(
|
||||
{int id,
|
||||
String image,
|
||||
String state,
|
||||
@JsonKey(name: 'cooking_time') int cookingTime,
|
||||
@JsonKey(name: 'active_time') int activeCookingTime,
|
||||
List<Ingredient>? ingredients,
|
||||
String description,
|
||||
List<Step>? steps,
|
||||
@JsonKey(name: 'video_url') String? videoUrl,
|
||||
@JsonKey(name: 'created_at') DateTime createdAt,
|
||||
@JsonKey(name: 'updated_at') DateTime updatedAt,
|
||||
String? title,
|
||||
String? type,
|
||||
String slug,
|
||||
@JsonKey(name: 'total_comments') int commentsCount,
|
||||
@JsonKey(name: 'was_liked_by_me') bool wasLikedByMe,
|
||||
@JsonKey(name: 'is_favorite') bool isFavorite,
|
||||
@JsonKey(name: 'energy_per_serving') double calories,
|
||||
@JsonKey(name: 'total_likes') int likesCount,
|
||||
@JsonKey(name: 'total_views') int viewsCount,
|
||||
Author author});
|
||||
$Res call({
|
||||
int id,
|
||||
String image,
|
||||
String state,
|
||||
@JsonKey(name: 'cooking_time') int cookingTime,
|
||||
@JsonKey(name: 'active_time') int activeCookingTime,
|
||||
List<Ingredient>? ingredients,
|
||||
String description,
|
||||
List<Step>? steps,
|
||||
@JsonKey(name: 'video_url') String? videoUrl,
|
||||
@JsonKey(name: 'created_at') DateTime createdAt,
|
||||
@JsonKey(name: 'updated_at') DateTime updatedAt,
|
||||
String? title,
|
||||
String? type,
|
||||
String slug,
|
||||
@JsonKey(name: 'total_comments') int commentsCount,
|
||||
@JsonKey(name: 'was_liked_by_me') bool wasLikedByMe,
|
||||
@JsonKey(name: 'is_favorite') bool isFavorite,
|
||||
@JsonKey(name: 'energy_per_serving') double calories,
|
||||
@JsonKey(name: 'total_likes') int likesCount,
|
||||
@JsonKey(name: 'total_views') int viewsCount,
|
||||
Author author,
|
||||
});
|
||||
|
||||
$AuthorCopyWith<$Res> get author;
|
||||
}
|
||||
@@ -130,92 +132,116 @@ class _$RecipeCopyWithImpl<$Res, $Val extends Recipe>
|
||||
Object? viewsCount = null,
|
||||
Object? author = null,
|
||||
}) {
|
||||
return _then(_value.copyWith(
|
||||
id: null == id
|
||||
? _value.id
|
||||
: id // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
image: null == image
|
||||
? _value.image
|
||||
: image // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
state: null == state
|
||||
? _value.state
|
||||
: state // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
cookingTime: null == cookingTime
|
||||
? _value.cookingTime
|
||||
: cookingTime // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
activeCookingTime: null == activeCookingTime
|
||||
? _value.activeCookingTime
|
||||
: activeCookingTime // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
ingredients: freezed == ingredients
|
||||
? _value.ingredients
|
||||
: ingredients // ignore: cast_nullable_to_non_nullable
|
||||
as List<Ingredient>?,
|
||||
description: null == description
|
||||
? _value.description
|
||||
: description // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
steps: freezed == steps
|
||||
? _value.steps
|
||||
: steps // ignore: cast_nullable_to_non_nullable
|
||||
as List<Step>?,
|
||||
videoUrl: freezed == videoUrl
|
||||
? _value.videoUrl
|
||||
: videoUrl // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
createdAt: null == createdAt
|
||||
? _value.createdAt
|
||||
: createdAt // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime,
|
||||
updatedAt: null == updatedAt
|
||||
? _value.updatedAt
|
||||
: updatedAt // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime,
|
||||
title: freezed == title
|
||||
? _value.title
|
||||
: title // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
type: freezed == type
|
||||
? _value.type
|
||||
: type // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
slug: null == slug
|
||||
? _value.slug
|
||||
: slug // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
commentsCount: null == commentsCount
|
||||
? _value.commentsCount
|
||||
: commentsCount // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
wasLikedByMe: null == wasLikedByMe
|
||||
? _value.wasLikedByMe
|
||||
: wasLikedByMe // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
isFavorite: null == isFavorite
|
||||
? _value.isFavorite
|
||||
: isFavorite // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
calories: null == calories
|
||||
? _value.calories
|
||||
: calories // ignore: cast_nullable_to_non_nullable
|
||||
as double,
|
||||
likesCount: null == likesCount
|
||||
? _value.likesCount
|
||||
: likesCount // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
viewsCount: null == viewsCount
|
||||
? _value.viewsCount
|
||||
: viewsCount // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
author: null == author
|
||||
? _value.author
|
||||
: author // ignore: cast_nullable_to_non_nullable
|
||||
as Author,
|
||||
) as $Val);
|
||||
return _then(
|
||||
_value.copyWith(
|
||||
id:
|
||||
null == id
|
||||
? _value.id
|
||||
: id // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
image:
|
||||
null == image
|
||||
? _value.image
|
||||
: image // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
state:
|
||||
null == state
|
||||
? _value.state
|
||||
: state // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
cookingTime:
|
||||
null == cookingTime
|
||||
? _value.cookingTime
|
||||
: cookingTime // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
activeCookingTime:
|
||||
null == activeCookingTime
|
||||
? _value.activeCookingTime
|
||||
: activeCookingTime // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
ingredients:
|
||||
freezed == ingredients
|
||||
? _value.ingredients
|
||||
: ingredients // ignore: cast_nullable_to_non_nullable
|
||||
as List<Ingredient>?,
|
||||
description:
|
||||
null == description
|
||||
? _value.description
|
||||
: description // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
steps:
|
||||
freezed == steps
|
||||
? _value.steps
|
||||
: steps // ignore: cast_nullable_to_non_nullable
|
||||
as List<Step>?,
|
||||
videoUrl:
|
||||
freezed == videoUrl
|
||||
? _value.videoUrl
|
||||
: videoUrl // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
createdAt:
|
||||
null == createdAt
|
||||
? _value.createdAt
|
||||
: createdAt // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime,
|
||||
updatedAt:
|
||||
null == updatedAt
|
||||
? _value.updatedAt
|
||||
: updatedAt // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime,
|
||||
title:
|
||||
freezed == title
|
||||
? _value.title
|
||||
: title // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
type:
|
||||
freezed == type
|
||||
? _value.type
|
||||
: type // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
slug:
|
||||
null == slug
|
||||
? _value.slug
|
||||
: slug // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
commentsCount:
|
||||
null == commentsCount
|
||||
? _value.commentsCount
|
||||
: commentsCount // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
wasLikedByMe:
|
||||
null == wasLikedByMe
|
||||
? _value.wasLikedByMe
|
||||
: wasLikedByMe // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
isFavorite:
|
||||
null == isFavorite
|
||||
? _value.isFavorite
|
||||
: isFavorite // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
calories:
|
||||
null == calories
|
||||
? _value.calories
|
||||
: calories // ignore: cast_nullable_to_non_nullable
|
||||
as double,
|
||||
likesCount:
|
||||
null == likesCount
|
||||
? _value.likesCount
|
||||
: likesCount // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
viewsCount:
|
||||
null == viewsCount
|
||||
? _value.viewsCount
|
||||
: viewsCount // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
author:
|
||||
null == author
|
||||
? _value.author
|
||||
: author // ignore: cast_nullable_to_non_nullable
|
||||
as Author,
|
||||
)
|
||||
as $Val,
|
||||
);
|
||||
}
|
||||
|
||||
/// Create a copy of Recipe
|
||||
@@ -232,32 +258,34 @@ class _$RecipeCopyWithImpl<$Res, $Val extends Recipe>
|
||||
/// @nodoc
|
||||
abstract class _$$RecipesImplCopyWith<$Res> implements $RecipeCopyWith<$Res> {
|
||||
factory _$$RecipesImplCopyWith(
|
||||
_$RecipesImpl value, $Res Function(_$RecipesImpl) then) =
|
||||
__$$RecipesImplCopyWithImpl<$Res>;
|
||||
_$RecipesImpl value,
|
||||
$Res Function(_$RecipesImpl) then,
|
||||
) = __$$RecipesImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call(
|
||||
{int id,
|
||||
String image,
|
||||
String state,
|
||||
@JsonKey(name: 'cooking_time') int cookingTime,
|
||||
@JsonKey(name: 'active_time') int activeCookingTime,
|
||||
List<Ingredient>? ingredients,
|
||||
String description,
|
||||
List<Step>? steps,
|
||||
@JsonKey(name: 'video_url') String? videoUrl,
|
||||
@JsonKey(name: 'created_at') DateTime createdAt,
|
||||
@JsonKey(name: 'updated_at') DateTime updatedAt,
|
||||
String? title,
|
||||
String? type,
|
||||
String slug,
|
||||
@JsonKey(name: 'total_comments') int commentsCount,
|
||||
@JsonKey(name: 'was_liked_by_me') bool wasLikedByMe,
|
||||
@JsonKey(name: 'is_favorite') bool isFavorite,
|
||||
@JsonKey(name: 'energy_per_serving') double calories,
|
||||
@JsonKey(name: 'total_likes') int likesCount,
|
||||
@JsonKey(name: 'total_views') int viewsCount,
|
||||
Author author});
|
||||
$Res call({
|
||||
int id,
|
||||
String image,
|
||||
String state,
|
||||
@JsonKey(name: 'cooking_time') int cookingTime,
|
||||
@JsonKey(name: 'active_time') int activeCookingTime,
|
||||
List<Ingredient>? ingredients,
|
||||
String description,
|
||||
List<Step>? steps,
|
||||
@JsonKey(name: 'video_url') String? videoUrl,
|
||||
@JsonKey(name: 'created_at') DateTime createdAt,
|
||||
@JsonKey(name: 'updated_at') DateTime updatedAt,
|
||||
String? title,
|
||||
String? type,
|
||||
String slug,
|
||||
@JsonKey(name: 'total_comments') int commentsCount,
|
||||
@JsonKey(name: 'was_liked_by_me') bool wasLikedByMe,
|
||||
@JsonKey(name: 'is_favorite') bool isFavorite,
|
||||
@JsonKey(name: 'energy_per_serving') double calories,
|
||||
@JsonKey(name: 'total_likes') int likesCount,
|
||||
@JsonKey(name: 'total_views') int viewsCount,
|
||||
Author author,
|
||||
});
|
||||
|
||||
@override
|
||||
$AuthorCopyWith<$Res> get author;
|
||||
@@ -268,8 +296,9 @@ class __$$RecipesImplCopyWithImpl<$Res>
|
||||
extends _$RecipeCopyWithImpl<$Res, _$RecipesImpl>
|
||||
implements _$$RecipesImplCopyWith<$Res> {
|
||||
__$$RecipesImplCopyWithImpl(
|
||||
_$RecipesImpl _value, $Res Function(_$RecipesImpl) _then)
|
||||
: super(_value, _then);
|
||||
_$RecipesImpl _value,
|
||||
$Res Function(_$RecipesImpl) _then,
|
||||
) : super(_value, _then);
|
||||
|
||||
/// Create a copy of Recipe
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -298,122 +327,145 @@ class __$$RecipesImplCopyWithImpl<$Res>
|
||||
Object? viewsCount = null,
|
||||
Object? author = null,
|
||||
}) {
|
||||
return _then(_$RecipesImpl(
|
||||
id: null == id
|
||||
? _value.id
|
||||
: id // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
image: null == image
|
||||
? _value.image
|
||||
: image // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
state: null == state
|
||||
? _value.state
|
||||
: state // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
cookingTime: null == cookingTime
|
||||
? _value.cookingTime
|
||||
: cookingTime // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
activeCookingTime: null == activeCookingTime
|
||||
? _value.activeCookingTime
|
||||
: activeCookingTime // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
ingredients: freezed == ingredients
|
||||
? _value._ingredients
|
||||
: ingredients // ignore: cast_nullable_to_non_nullable
|
||||
as List<Ingredient>?,
|
||||
description: null == description
|
||||
? _value.description
|
||||
: description // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
steps: freezed == steps
|
||||
? _value._steps
|
||||
: steps // ignore: cast_nullable_to_non_nullable
|
||||
as List<Step>?,
|
||||
videoUrl: freezed == videoUrl
|
||||
? _value.videoUrl
|
||||
: videoUrl // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
createdAt: null == createdAt
|
||||
? _value.createdAt
|
||||
: createdAt // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime,
|
||||
updatedAt: null == updatedAt
|
||||
? _value.updatedAt
|
||||
: updatedAt // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime,
|
||||
title: freezed == title
|
||||
? _value.title
|
||||
: title // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
type: freezed == type
|
||||
? _value.type
|
||||
: type // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
slug: null == slug
|
||||
? _value.slug
|
||||
: slug // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
commentsCount: null == commentsCount
|
||||
? _value.commentsCount
|
||||
: commentsCount // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
wasLikedByMe: null == wasLikedByMe
|
||||
? _value.wasLikedByMe
|
||||
: wasLikedByMe // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
isFavorite: null == isFavorite
|
||||
? _value.isFavorite
|
||||
: isFavorite // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
calories: null == calories
|
||||
? _value.calories
|
||||
: calories // ignore: cast_nullable_to_non_nullable
|
||||
as double,
|
||||
likesCount: null == likesCount
|
||||
? _value.likesCount
|
||||
: likesCount // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
viewsCount: null == viewsCount
|
||||
? _value.viewsCount
|
||||
: viewsCount // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
author: null == author
|
||||
? _value.author
|
||||
: author // ignore: cast_nullable_to_non_nullable
|
||||
as Author,
|
||||
));
|
||||
return _then(
|
||||
_$RecipesImpl(
|
||||
id:
|
||||
null == id
|
||||
? _value.id
|
||||
: id // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
image:
|
||||
null == image
|
||||
? _value.image
|
||||
: image // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
state:
|
||||
null == state
|
||||
? _value.state
|
||||
: state // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
cookingTime:
|
||||
null == cookingTime
|
||||
? _value.cookingTime
|
||||
: cookingTime // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
activeCookingTime:
|
||||
null == activeCookingTime
|
||||
? _value.activeCookingTime
|
||||
: activeCookingTime // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
ingredients:
|
||||
freezed == ingredients
|
||||
? _value._ingredients
|
||||
: ingredients // ignore: cast_nullable_to_non_nullable
|
||||
as List<Ingredient>?,
|
||||
description:
|
||||
null == description
|
||||
? _value.description
|
||||
: description // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
steps:
|
||||
freezed == steps
|
||||
? _value._steps
|
||||
: steps // ignore: cast_nullable_to_non_nullable
|
||||
as List<Step>?,
|
||||
videoUrl:
|
||||
freezed == videoUrl
|
||||
? _value.videoUrl
|
||||
: videoUrl // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
createdAt:
|
||||
null == createdAt
|
||||
? _value.createdAt
|
||||
: createdAt // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime,
|
||||
updatedAt:
|
||||
null == updatedAt
|
||||
? _value.updatedAt
|
||||
: updatedAt // ignore: cast_nullable_to_non_nullable
|
||||
as DateTime,
|
||||
title:
|
||||
freezed == title
|
||||
? _value.title
|
||||
: title // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
type:
|
||||
freezed == type
|
||||
? _value.type
|
||||
: type // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
slug:
|
||||
null == slug
|
||||
? _value.slug
|
||||
: slug // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
commentsCount:
|
||||
null == commentsCount
|
||||
? _value.commentsCount
|
||||
: commentsCount // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
wasLikedByMe:
|
||||
null == wasLikedByMe
|
||||
? _value.wasLikedByMe
|
||||
: wasLikedByMe // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
isFavorite:
|
||||
null == isFavorite
|
||||
? _value.isFavorite
|
||||
: isFavorite // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
calories:
|
||||
null == calories
|
||||
? _value.calories
|
||||
: calories // ignore: cast_nullable_to_non_nullable
|
||||
as double,
|
||||
likesCount:
|
||||
null == likesCount
|
||||
? _value.likesCount
|
||||
: likesCount // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
viewsCount:
|
||||
null == viewsCount
|
||||
? _value.viewsCount
|
||||
: viewsCount // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
author:
|
||||
null == author
|
||||
? _value.author
|
||||
: author // ignore: cast_nullable_to_non_nullable
|
||||
as Author,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
class _$RecipesImpl implements _Recipes {
|
||||
const _$RecipesImpl(
|
||||
{required this.id,
|
||||
required this.image,
|
||||
required this.state,
|
||||
@JsonKey(name: 'cooking_time') required this.cookingTime,
|
||||
@JsonKey(name: 'active_time') required this.activeCookingTime,
|
||||
required final List<Ingredient>? ingredients,
|
||||
required this.description,
|
||||
required final List<Step>? steps,
|
||||
@JsonKey(name: 'video_url') required this.videoUrl,
|
||||
@JsonKey(name: 'created_at') required this.createdAt,
|
||||
@JsonKey(name: 'updated_at') required this.updatedAt,
|
||||
required this.title,
|
||||
required this.type,
|
||||
required this.slug,
|
||||
@JsonKey(name: 'total_comments') required this.commentsCount,
|
||||
@JsonKey(name: 'was_liked_by_me') required this.wasLikedByMe,
|
||||
@JsonKey(name: 'is_favorite') required this.isFavorite,
|
||||
@JsonKey(name: 'energy_per_serving') required this.calories,
|
||||
@JsonKey(name: 'total_likes') required this.likesCount,
|
||||
@JsonKey(name: 'total_views') required this.viewsCount,
|
||||
required this.author})
|
||||
: _ingredients = ingredients,
|
||||
_steps = steps;
|
||||
const _$RecipesImpl({
|
||||
required this.id,
|
||||
required this.image,
|
||||
required this.state,
|
||||
@JsonKey(name: 'cooking_time') required this.cookingTime,
|
||||
@JsonKey(name: 'active_time') required this.activeCookingTime,
|
||||
required final List<Ingredient>? ingredients,
|
||||
required this.description,
|
||||
required final List<Step>? steps,
|
||||
@JsonKey(name: 'video_url') required this.videoUrl,
|
||||
@JsonKey(name: 'created_at') required this.createdAt,
|
||||
@JsonKey(name: 'updated_at') required this.updatedAt,
|
||||
required this.title,
|
||||
required this.type,
|
||||
required this.slug,
|
||||
@JsonKey(name: 'total_comments') required this.commentsCount,
|
||||
@JsonKey(name: 'was_liked_by_me') required this.wasLikedByMe,
|
||||
@JsonKey(name: 'is_favorite') required this.isFavorite,
|
||||
@JsonKey(name: 'energy_per_serving') required this.calories,
|
||||
@JsonKey(name: 'total_likes') required this.likesCount,
|
||||
@JsonKey(name: 'total_views') required this.viewsCount,
|
||||
required this.author,
|
||||
}) : _ingredients = ingredients,
|
||||
_steps = steps;
|
||||
|
||||
factory _$RecipesImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$RecipesImplFromJson(json);
|
||||
@@ -505,8 +557,10 @@ class _$RecipesImpl implements _Recipes {
|
||||
other.cookingTime == cookingTime) &&
|
||||
(identical(other.activeCookingTime, activeCookingTime) ||
|
||||
other.activeCookingTime == activeCookingTime) &&
|
||||
const DeepCollectionEquality()
|
||||
.equals(other._ingredients, _ingredients) &&
|
||||
const DeepCollectionEquality().equals(
|
||||
other._ingredients,
|
||||
_ingredients,
|
||||
) &&
|
||||
(identical(other.description, description) ||
|
||||
other.description == description) &&
|
||||
const DeepCollectionEquality().equals(other._steps, _steps) &&
|
||||
@@ -537,29 +591,29 @@ class _$RecipesImpl implements _Recipes {
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hashAll([
|
||||
runtimeType,
|
||||
id,
|
||||
image,
|
||||
state,
|
||||
cookingTime,
|
||||
activeCookingTime,
|
||||
const DeepCollectionEquality().hash(_ingredients),
|
||||
description,
|
||||
const DeepCollectionEquality().hash(_steps),
|
||||
videoUrl,
|
||||
createdAt,
|
||||
updatedAt,
|
||||
title,
|
||||
type,
|
||||
slug,
|
||||
commentsCount,
|
||||
wasLikedByMe,
|
||||
isFavorite,
|
||||
calories,
|
||||
likesCount,
|
||||
viewsCount,
|
||||
author
|
||||
]);
|
||||
runtimeType,
|
||||
id,
|
||||
image,
|
||||
state,
|
||||
cookingTime,
|
||||
activeCookingTime,
|
||||
const DeepCollectionEquality().hash(_ingredients),
|
||||
description,
|
||||
const DeepCollectionEquality().hash(_steps),
|
||||
videoUrl,
|
||||
createdAt,
|
||||
updatedAt,
|
||||
title,
|
||||
type,
|
||||
slug,
|
||||
commentsCount,
|
||||
wasLikedByMe,
|
||||
isFavorite,
|
||||
calories,
|
||||
likesCount,
|
||||
viewsCount,
|
||||
author,
|
||||
]);
|
||||
|
||||
/// Create a copy of Recipe
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -571,35 +625,34 @@ class _$RecipesImpl implements _Recipes {
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$$RecipesImplToJson(
|
||||
this,
|
||||
);
|
||||
return _$$RecipesImplToJson(this);
|
||||
}
|
||||
}
|
||||
|
||||
abstract class _Recipes implements Recipe {
|
||||
const factory _Recipes(
|
||||
{required final int id,
|
||||
required final String image,
|
||||
required final String state,
|
||||
@JsonKey(name: 'cooking_time') required final int cookingTime,
|
||||
@JsonKey(name: 'active_time') required final int activeCookingTime,
|
||||
required final List<Ingredient>? ingredients,
|
||||
required final String description,
|
||||
required final List<Step>? steps,
|
||||
@JsonKey(name: 'video_url') required final String? videoUrl,
|
||||
@JsonKey(name: 'created_at') required final DateTime createdAt,
|
||||
@JsonKey(name: 'updated_at') required final DateTime updatedAt,
|
||||
required final String? title,
|
||||
required final String? type,
|
||||
required final String slug,
|
||||
@JsonKey(name: 'total_comments') required final int commentsCount,
|
||||
@JsonKey(name: 'was_liked_by_me') required final bool wasLikedByMe,
|
||||
@JsonKey(name: 'is_favorite') required final bool isFavorite,
|
||||
@JsonKey(name: 'energy_per_serving') required final double calories,
|
||||
@JsonKey(name: 'total_likes') required final int likesCount,
|
||||
@JsonKey(name: 'total_views') required final int viewsCount,
|
||||
required final Author author}) = _$RecipesImpl;
|
||||
const factory _Recipes({
|
||||
required final int id,
|
||||
required final String image,
|
||||
required final String state,
|
||||
@JsonKey(name: 'cooking_time') required final int cookingTime,
|
||||
@JsonKey(name: 'active_time') required final int activeCookingTime,
|
||||
required final List<Ingredient>? ingredients,
|
||||
required final String description,
|
||||
required final List<Step>? steps,
|
||||
@JsonKey(name: 'video_url') required final String? videoUrl,
|
||||
@JsonKey(name: 'created_at') required final DateTime createdAt,
|
||||
@JsonKey(name: 'updated_at') required final DateTime updatedAt,
|
||||
required final String? title,
|
||||
required final String? type,
|
||||
required final String slug,
|
||||
@JsonKey(name: 'total_comments') required final int commentsCount,
|
||||
@JsonKey(name: 'was_liked_by_me') required final bool wasLikedByMe,
|
||||
@JsonKey(name: 'is_favorite') required final bool isFavorite,
|
||||
@JsonKey(name: 'energy_per_serving') required final double calories,
|
||||
@JsonKey(name: 'total_likes') required final int likesCount,
|
||||
@JsonKey(name: 'total_views') required final int viewsCount,
|
||||
required final Author author,
|
||||
}) = _$RecipesImpl;
|
||||
|
||||
factory _Recipes.fromJson(Map<String, dynamic> json) = _$RecipesImpl.fromJson;
|
||||
|
||||
@@ -688,8 +741,9 @@ mixin _$Ingredient {
|
||||
/// @nodoc
|
||||
abstract class $IngredientCopyWith<$Res> {
|
||||
factory $IngredientCopyWith(
|
||||
Ingredient value, $Res Function(Ingredient) then) =
|
||||
_$IngredientCopyWithImpl<$Res, Ingredient>;
|
||||
Ingredient value,
|
||||
$Res Function(Ingredient) then,
|
||||
) = _$IngredientCopyWithImpl<$Res, Ingredient>;
|
||||
@useResult
|
||||
$Res call({String name, String? unit, String portion});
|
||||
}
|
||||
@@ -713,20 +767,26 @@ class _$IngredientCopyWithImpl<$Res, $Val extends Ingredient>
|
||||
Object? unit = freezed,
|
||||
Object? portion = null,
|
||||
}) {
|
||||
return _then(_value.copyWith(
|
||||
name: null == name
|
||||
? _value.name
|
||||
: name // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
unit: freezed == unit
|
||||
? _value.unit
|
||||
: unit // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
portion: null == portion
|
||||
? _value.portion
|
||||
: portion // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
) as $Val);
|
||||
return _then(
|
||||
_value.copyWith(
|
||||
name:
|
||||
null == name
|
||||
? _value.name
|
||||
: name // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
unit:
|
||||
freezed == unit
|
||||
? _value.unit
|
||||
: unit // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
portion:
|
||||
null == portion
|
||||
? _value.portion
|
||||
: portion // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
)
|
||||
as $Val,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -734,8 +794,9 @@ class _$IngredientCopyWithImpl<$Res, $Val extends Ingredient>
|
||||
abstract class _$$IngredientImplCopyWith<$Res>
|
||||
implements $IngredientCopyWith<$Res> {
|
||||
factory _$$IngredientImplCopyWith(
|
||||
_$IngredientImpl value, $Res Function(_$IngredientImpl) then) =
|
||||
__$$IngredientImplCopyWithImpl<$Res>;
|
||||
_$IngredientImpl value,
|
||||
$Res Function(_$IngredientImpl) then,
|
||||
) = __$$IngredientImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call({String name, String? unit, String portion});
|
||||
@@ -746,8 +807,9 @@ class __$$IngredientImplCopyWithImpl<$Res>
|
||||
extends _$IngredientCopyWithImpl<$Res, _$IngredientImpl>
|
||||
implements _$$IngredientImplCopyWith<$Res> {
|
||||
__$$IngredientImplCopyWithImpl(
|
||||
_$IngredientImpl _value, $Res Function(_$IngredientImpl) _then)
|
||||
: super(_value, _then);
|
||||
_$IngredientImpl _value,
|
||||
$Res Function(_$IngredientImpl) _then,
|
||||
) : super(_value, _then);
|
||||
|
||||
/// Create a copy of Ingredient
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -758,28 +820,36 @@ class __$$IngredientImplCopyWithImpl<$Res>
|
||||
Object? unit = freezed,
|
||||
Object? portion = null,
|
||||
}) {
|
||||
return _then(_$IngredientImpl(
|
||||
name: null == name
|
||||
? _value.name
|
||||
: name // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
unit: freezed == unit
|
||||
? _value.unit
|
||||
: unit // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
portion: null == portion
|
||||
? _value.portion
|
||||
: portion // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
));
|
||||
return _then(
|
||||
_$IngredientImpl(
|
||||
name:
|
||||
null == name
|
||||
? _value.name
|
||||
: name // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
unit:
|
||||
freezed == unit
|
||||
? _value.unit
|
||||
: unit // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
portion:
|
||||
null == portion
|
||||
? _value.portion
|
||||
: portion // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
class _$IngredientImpl implements _Ingredient {
|
||||
const _$IngredientImpl(
|
||||
{required this.name, this.unit, required this.portion});
|
||||
const _$IngredientImpl({
|
||||
required this.name,
|
||||
this.unit,
|
||||
required this.portion,
|
||||
});
|
||||
|
||||
factory _$IngredientImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$IngredientImplFromJson(json);
|
||||
@@ -820,17 +890,16 @@ class _$IngredientImpl implements _Ingredient {
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$$IngredientImplToJson(
|
||||
this,
|
||||
);
|
||||
return _$$IngredientImplToJson(this);
|
||||
}
|
||||
}
|
||||
|
||||
abstract class _Ingredient implements Ingredient {
|
||||
const factory _Ingredient(
|
||||
{required final String name,
|
||||
final String? unit,
|
||||
required final String portion}) = _$IngredientImpl;
|
||||
const factory _Ingredient({
|
||||
required final String name,
|
||||
final String? unit,
|
||||
required final String portion,
|
||||
}) = _$IngredientImpl;
|
||||
|
||||
factory _Ingredient.fromJson(Map<String, dynamic> json) =
|
||||
_$IngredientImpl.fromJson;
|
||||
@@ -890,28 +959,31 @@ class _$StepCopyWithImpl<$Res, $Val extends Step>
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? image = null,
|
||||
Object? description = null,
|
||||
}) {
|
||||
return _then(_value.copyWith(
|
||||
image: null == image
|
||||
? _value.image
|
||||
: image // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
description: null == description
|
||||
? _value.description
|
||||
: description // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
) as $Val);
|
||||
$Res call({Object? image = null, Object? description = null}) {
|
||||
return _then(
|
||||
_value.copyWith(
|
||||
image:
|
||||
null == image
|
||||
? _value.image
|
||||
: image // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
description:
|
||||
null == description
|
||||
? _value.description
|
||||
: description // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
)
|
||||
as $Val,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$StepImplCopyWith<$Res> implements $StepCopyWith<$Res> {
|
||||
factory _$$StepImplCopyWith(
|
||||
_$StepImpl value, $Res Function(_$StepImpl) then) =
|
||||
__$$StepImplCopyWithImpl<$Res>;
|
||||
_$StepImpl value,
|
||||
$Res Function(_$StepImpl) then,
|
||||
) = __$$StepImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call({String image, String description});
|
||||
@@ -922,26 +994,27 @@ class __$$StepImplCopyWithImpl<$Res>
|
||||
extends _$StepCopyWithImpl<$Res, _$StepImpl>
|
||||
implements _$$StepImplCopyWith<$Res> {
|
||||
__$$StepImplCopyWithImpl(_$StepImpl _value, $Res Function(_$StepImpl) _then)
|
||||
: super(_value, _then);
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of Step
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? image = null,
|
||||
Object? description = null,
|
||||
}) {
|
||||
return _then(_$StepImpl(
|
||||
image: null == image
|
||||
? _value.image
|
||||
: image // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
description: null == description
|
||||
? _value.description
|
||||
: description // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
));
|
||||
$Res call({Object? image = null, Object? description = null}) {
|
||||
return _then(
|
||||
_$StepImpl(
|
||||
image:
|
||||
null == image
|
||||
? _value.image
|
||||
: image // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
description:
|
||||
null == description
|
||||
? _value.description
|
||||
: description // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -987,16 +1060,15 @@ class _$StepImpl implements _Step {
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$$StepImplToJson(
|
||||
this,
|
||||
);
|
||||
return _$$StepImplToJson(this);
|
||||
}
|
||||
}
|
||||
|
||||
abstract class _Step implements Step {
|
||||
const factory _Step(
|
||||
{required final String image,
|
||||
required final String description}) = _$StepImpl;
|
||||
const factory _Step({
|
||||
required final String image,
|
||||
required final String description,
|
||||
}) = _$StepImpl;
|
||||
|
||||
factory _Step.fromJson(Map<String, dynamic> json) = _$StepImpl.fromJson;
|
||||
|
||||
|
||||
@@ -13,13 +13,15 @@ _$RecipesImpl _$$RecipesImplFromJson(Map<String, dynamic> json) =>
|
||||
state: json['state'] as String,
|
||||
cookingTime: (json['cooking_time'] as num).toInt(),
|
||||
activeCookingTime: (json['active_time'] as num).toInt(),
|
||||
ingredients: (json['ingredients'] as List<dynamic>?)
|
||||
?.map((e) => Ingredient.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
ingredients:
|
||||
(json['ingredients'] as List<dynamic>?)
|
||||
?.map((e) => Ingredient.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
description: json['description'] as String,
|
||||
steps: (json['steps'] as List<dynamic>?)
|
||||
?.map((e) => Step.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
steps:
|
||||
(json['steps'] as List<dynamic>?)
|
||||
?.map((e) => Step.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
videoUrl: json['video_url'] as String?,
|
||||
createdAt: DateTime.parse(json['created_at'] as String),
|
||||
updatedAt: DateTime.parse(json['updated_at'] as String),
|
||||
@@ -75,9 +77,9 @@ Map<String, dynamic> _$$IngredientImplToJson(_$IngredientImpl instance) =>
|
||||
};
|
||||
|
||||
_$StepImpl _$$StepImplFromJson(Map<String, dynamic> json) => _$StepImpl(
|
||||
image: json['image'] as String,
|
||||
description: json['description'] as String,
|
||||
);
|
||||
image: json['image'] as String,
|
||||
description: json['description'] as String,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$StepImplToJson(_$StepImpl instance) =>
|
||||
<String, dynamic>{
|
||||
|
||||
@@ -12,7 +12,8 @@ part of 'recipes_pagination_model.dart';
|
||||
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');
|
||||
'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',
|
||||
);
|
||||
|
||||
RecipesPagination _$RecipesPaginationFromJson(Map<String, dynamic> json) {
|
||||
return _RecipesPagination.fromJson(json);
|
||||
@@ -36,8 +37,9 @@ mixin _$RecipesPagination {
|
||||
/// @nodoc
|
||||
abstract class $RecipesPaginationCopyWith<$Res> {
|
||||
factory $RecipesPaginationCopyWith(
|
||||
RecipesPagination value, $Res Function(RecipesPagination) then) =
|
||||
_$RecipesPaginationCopyWithImpl<$Res, RecipesPagination>;
|
||||
RecipesPagination value,
|
||||
$Res Function(RecipesPagination) then,
|
||||
) = _$RecipesPaginationCopyWithImpl<$Res, RecipesPagination>;
|
||||
@useResult
|
||||
$Res call({@JsonKey(name: 'data') List<Recipe> recipesList});
|
||||
}
|
||||
@@ -56,24 +58,27 @@ class _$RecipesPaginationCopyWithImpl<$Res, $Val extends RecipesPagination>
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? recipesList = null,
|
||||
}) {
|
||||
return _then(_value.copyWith(
|
||||
recipesList: null == recipesList
|
||||
? _value.recipesList
|
||||
: recipesList // ignore: cast_nullable_to_non_nullable
|
||||
as List<Recipe>,
|
||||
) as $Val);
|
||||
$Res call({Object? recipesList = null}) {
|
||||
return _then(
|
||||
_value.copyWith(
|
||||
recipesList:
|
||||
null == recipesList
|
||||
? _value.recipesList
|
||||
: recipesList // ignore: cast_nullable_to_non_nullable
|
||||
as List<Recipe>,
|
||||
)
|
||||
as $Val,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$RecipesPaginationImplCopyWith<$Res>
|
||||
implements $RecipesPaginationCopyWith<$Res> {
|
||||
factory _$$RecipesPaginationImplCopyWith(_$RecipesPaginationImpl value,
|
||||
$Res Function(_$RecipesPaginationImpl) then) =
|
||||
__$$RecipesPaginationImplCopyWithImpl<$Res>;
|
||||
factory _$$RecipesPaginationImplCopyWith(
|
||||
_$RecipesPaginationImpl value,
|
||||
$Res Function(_$RecipesPaginationImpl) then,
|
||||
) = __$$RecipesPaginationImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call({@JsonKey(name: 'data') List<Recipe> recipesList});
|
||||
@@ -83,32 +88,34 @@ abstract class _$$RecipesPaginationImplCopyWith<$Res>
|
||||
class __$$RecipesPaginationImplCopyWithImpl<$Res>
|
||||
extends _$RecipesPaginationCopyWithImpl<$Res, _$RecipesPaginationImpl>
|
||||
implements _$$RecipesPaginationImplCopyWith<$Res> {
|
||||
__$$RecipesPaginationImplCopyWithImpl(_$RecipesPaginationImpl _value,
|
||||
$Res Function(_$RecipesPaginationImpl) _then)
|
||||
: super(_value, _then);
|
||||
__$$RecipesPaginationImplCopyWithImpl(
|
||||
_$RecipesPaginationImpl _value,
|
||||
$Res Function(_$RecipesPaginationImpl) _then,
|
||||
) : super(_value, _then);
|
||||
|
||||
/// Create a copy of RecipesPagination
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? recipesList = null,
|
||||
}) {
|
||||
return _then(_$RecipesPaginationImpl(
|
||||
recipesList: null == recipesList
|
||||
? _value._recipesList
|
||||
: recipesList // ignore: cast_nullable_to_non_nullable
|
||||
as List<Recipe>,
|
||||
));
|
||||
$Res call({Object? recipesList = null}) {
|
||||
return _then(
|
||||
_$RecipesPaginationImpl(
|
||||
recipesList:
|
||||
null == recipesList
|
||||
? _value._recipesList
|
||||
: recipesList // ignore: cast_nullable_to_non_nullable
|
||||
as List<Recipe>,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
class _$RecipesPaginationImpl implements _RecipesPagination {
|
||||
const _$RecipesPaginationImpl(
|
||||
{@JsonKey(name: 'data') required final List<Recipe> recipesList})
|
||||
: _recipesList = recipesList;
|
||||
const _$RecipesPaginationImpl({
|
||||
@JsonKey(name: 'data') required final List<Recipe> recipesList,
|
||||
}) : _recipesList = recipesList;
|
||||
|
||||
factory _$RecipesPaginationImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$RecipesPaginationImplFromJson(json);
|
||||
@@ -132,14 +139,18 @@ class _$RecipesPaginationImpl implements _RecipesPagination {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$RecipesPaginationImpl &&
|
||||
const DeepCollectionEquality()
|
||||
.equals(other._recipesList, _recipesList));
|
||||
const DeepCollectionEquality().equals(
|
||||
other._recipesList,
|
||||
_recipesList,
|
||||
));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(
|
||||
runtimeType, const DeepCollectionEquality().hash(_recipesList));
|
||||
runtimeType,
|
||||
const DeepCollectionEquality().hash(_recipesList),
|
||||
);
|
||||
|
||||
/// Create a copy of RecipesPagination
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -148,20 +159,20 @@ class _$RecipesPaginationImpl implements _RecipesPagination {
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$RecipesPaginationImplCopyWith<_$RecipesPaginationImpl> get copyWith =>
|
||||
__$$RecipesPaginationImplCopyWithImpl<_$RecipesPaginationImpl>(
|
||||
this, _$identity);
|
||||
this,
|
||||
_$identity,
|
||||
);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$$RecipesPaginationImplToJson(
|
||||
this,
|
||||
);
|
||||
return _$$RecipesPaginationImplToJson(this);
|
||||
}
|
||||
}
|
||||
|
||||
abstract class _RecipesPagination implements RecipesPagination {
|
||||
const factory _RecipesPagination(
|
||||
{@JsonKey(name: 'data') required final List<Recipe> recipesList}) =
|
||||
_$RecipesPaginationImpl;
|
||||
const factory _RecipesPagination({
|
||||
@JsonKey(name: 'data') required final List<Recipe> recipesList,
|
||||
}) = _$RecipesPaginationImpl;
|
||||
|
||||
factory _RecipesPagination.fromJson(Map<String, dynamic> json) =
|
||||
_$RecipesPaginationImpl.fromJson;
|
||||
|
||||
@@ -7,15 +7,14 @@ part of 'recipes_pagination_model.dart';
|
||||
// **************************************************************************
|
||||
|
||||
_$RecipesPaginationImpl _$$RecipesPaginationImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$RecipesPaginationImpl(
|
||||
recipesList: (json['data'] as List<dynamic>)
|
||||
Map<String, dynamic> json,
|
||||
) => _$RecipesPaginationImpl(
|
||||
recipesList:
|
||||
(json['data'] as List<dynamic>)
|
||||
.map((e) => Recipe.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
);
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$RecipesPaginationImplToJson(
|
||||
_$RecipesPaginationImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'data': instance.recipesList,
|
||||
};
|
||||
_$RecipesPaginationImpl instance,
|
||||
) => <String, dynamic>{'data': instance.recipesList};
|
||||
|
||||
@@ -12,7 +12,8 @@ part of 'comments_state.dart';
|
||||
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');
|
||||
'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',
|
||||
);
|
||||
|
||||
/// @nodoc
|
||||
mixin _$CommentsState {
|
||||
@@ -22,16 +23,14 @@ mixin _$CommentsState {
|
||||
required TResult Function() loading,
|
||||
required TResult Function(CommentModel comment, int? replyId) loaded,
|
||||
required TResult Function(String errorMessage) error,
|
||||
}) =>
|
||||
throw _privateConstructorUsedError;
|
||||
}) => throw _privateConstructorUsedError;
|
||||
@optionalTypeArgs
|
||||
TResult? whenOrNull<TResult extends Object?>(
|
||||
TResult? Function()? $default, {
|
||||
TResult? Function()? loading,
|
||||
TResult? Function(CommentModel comment, int? replyId)? loaded,
|
||||
TResult? Function(String errorMessage)? error,
|
||||
}) =>
|
||||
throw _privateConstructorUsedError;
|
||||
}) => throw _privateConstructorUsedError;
|
||||
@optionalTypeArgs
|
||||
TResult maybeWhen<TResult extends Object?>(
|
||||
TResult Function()? $default, {
|
||||
@@ -39,24 +38,21 @@ mixin _$CommentsState {
|
||||
TResult Function(CommentModel comment, int? replyId)? loaded,
|
||||
TResult Function(String errorMessage)? error,
|
||||
required TResult orElse(),
|
||||
}) =>
|
||||
throw _privateConstructorUsedError;
|
||||
}) => throw _privateConstructorUsedError;
|
||||
@optionalTypeArgs
|
||||
TResult map<TResult extends Object?>(
|
||||
TResult Function(_CommentsState value) $default, {
|
||||
required TResult Function(CommentsStateLoading value) loading,
|
||||
required TResult Function(CommentsStateLoaded value) loaded,
|
||||
required TResult Function(CommentsStateError value) error,
|
||||
}) =>
|
||||
throw _privateConstructorUsedError;
|
||||
}) => throw _privateConstructorUsedError;
|
||||
@optionalTypeArgs
|
||||
TResult? mapOrNull<TResult extends Object?>(
|
||||
TResult? Function(_CommentsState value)? $default, {
|
||||
TResult? Function(CommentsStateLoading value)? loading,
|
||||
TResult? Function(CommentsStateLoaded value)? loaded,
|
||||
TResult? Function(CommentsStateError value)? error,
|
||||
}) =>
|
||||
throw _privateConstructorUsedError;
|
||||
}) => throw _privateConstructorUsedError;
|
||||
@optionalTypeArgs
|
||||
TResult maybeMap<TResult extends Object?>(
|
||||
TResult Function(_CommentsState value)? $default, {
|
||||
@@ -64,15 +60,15 @@ mixin _$CommentsState {
|
||||
TResult Function(CommentsStateLoaded value)? loaded,
|
||||
TResult Function(CommentsStateError value)? error,
|
||||
required TResult orElse(),
|
||||
}) =>
|
||||
throw _privateConstructorUsedError;
|
||||
}) => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $CommentsStateCopyWith<$Res> {
|
||||
factory $CommentsStateCopyWith(
|
||||
CommentsState value, $Res Function(CommentsState) then) =
|
||||
_$CommentsStateCopyWithImpl<$Res, CommentsState>;
|
||||
CommentsState value,
|
||||
$Res Function(CommentsState) then,
|
||||
) = _$CommentsStateCopyWithImpl<$Res, CommentsState>;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@@ -92,8 +88,9 @@ class _$CommentsStateCopyWithImpl<$Res, $Val extends CommentsState>
|
||||
/// @nodoc
|
||||
abstract class _$$CommentsStateImplCopyWith<$Res> {
|
||||
factory _$$CommentsStateImplCopyWith(
|
||||
_$CommentsStateImpl value, $Res Function(_$CommentsStateImpl) then) =
|
||||
__$$CommentsStateImplCopyWithImpl<$Res>;
|
||||
_$CommentsStateImpl value,
|
||||
$Res Function(_$CommentsStateImpl) then,
|
||||
) = __$$CommentsStateImplCopyWithImpl<$Res>;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@@ -101,8 +98,9 @@ class __$$CommentsStateImplCopyWithImpl<$Res>
|
||||
extends _$CommentsStateCopyWithImpl<$Res, _$CommentsStateImpl>
|
||||
implements _$$CommentsStateImplCopyWith<$Res> {
|
||||
__$$CommentsStateImplCopyWithImpl(
|
||||
_$CommentsStateImpl _value, $Res Function(_$CommentsStateImpl) _then)
|
||||
: super(_value, _then);
|
||||
_$CommentsStateImpl _value,
|
||||
$Res Function(_$CommentsStateImpl) _then,
|
||||
) : super(_value, _then);
|
||||
|
||||
/// Create a copy of CommentsState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -208,18 +206,20 @@ abstract class _CommentsState implements CommentsState {
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$CommentsStateLoadingImplCopyWith<$Res> {
|
||||
factory _$$CommentsStateLoadingImplCopyWith(_$CommentsStateLoadingImpl value,
|
||||
$Res Function(_$CommentsStateLoadingImpl) then) =
|
||||
__$$CommentsStateLoadingImplCopyWithImpl<$Res>;
|
||||
factory _$$CommentsStateLoadingImplCopyWith(
|
||||
_$CommentsStateLoadingImpl value,
|
||||
$Res Function(_$CommentsStateLoadingImpl) then,
|
||||
) = __$$CommentsStateLoadingImplCopyWithImpl<$Res>;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$CommentsStateLoadingImplCopyWithImpl<$Res>
|
||||
extends _$CommentsStateCopyWithImpl<$Res, _$CommentsStateLoadingImpl>
|
||||
implements _$$CommentsStateLoadingImplCopyWith<$Res> {
|
||||
__$$CommentsStateLoadingImplCopyWithImpl(_$CommentsStateLoadingImpl _value,
|
||||
$Res Function(_$CommentsStateLoadingImpl) _then)
|
||||
: super(_value, _then);
|
||||
__$$CommentsStateLoadingImplCopyWithImpl(
|
||||
_$CommentsStateLoadingImpl _value,
|
||||
$Res Function(_$CommentsStateLoadingImpl) _then,
|
||||
) : super(_value, _then);
|
||||
|
||||
/// Create a copy of CommentsState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -326,9 +326,10 @@ abstract class CommentsStateLoading implements CommentsState {
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$CommentsStateLoadedImplCopyWith<$Res> {
|
||||
factory _$$CommentsStateLoadedImplCopyWith(_$CommentsStateLoadedImpl value,
|
||||
$Res Function(_$CommentsStateLoadedImpl) then) =
|
||||
__$$CommentsStateLoadedImplCopyWithImpl<$Res>;
|
||||
factory _$$CommentsStateLoadedImplCopyWith(
|
||||
_$CommentsStateLoadedImpl value,
|
||||
$Res Function(_$CommentsStateLoadedImpl) then,
|
||||
) = __$$CommentsStateLoadedImplCopyWithImpl<$Res>;
|
||||
@useResult
|
||||
$Res call({CommentModel comment, int? replyId});
|
||||
|
||||
@@ -339,28 +340,30 @@ abstract class _$$CommentsStateLoadedImplCopyWith<$Res> {
|
||||
class __$$CommentsStateLoadedImplCopyWithImpl<$Res>
|
||||
extends _$CommentsStateCopyWithImpl<$Res, _$CommentsStateLoadedImpl>
|
||||
implements _$$CommentsStateLoadedImplCopyWith<$Res> {
|
||||
__$$CommentsStateLoadedImplCopyWithImpl(_$CommentsStateLoadedImpl _value,
|
||||
$Res Function(_$CommentsStateLoadedImpl) _then)
|
||||
: super(_value, _then);
|
||||
__$$CommentsStateLoadedImplCopyWithImpl(
|
||||
_$CommentsStateLoadedImpl _value,
|
||||
$Res Function(_$CommentsStateLoadedImpl) _then,
|
||||
) : super(_value, _then);
|
||||
|
||||
/// Create a copy of CommentsState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? comment = null,
|
||||
Object? replyId = freezed,
|
||||
}) {
|
||||
return _then(_$CommentsStateLoadedImpl(
|
||||
comment: null == comment
|
||||
? _value.comment
|
||||
: comment // ignore: cast_nullable_to_non_nullable
|
||||
as CommentModel,
|
||||
replyId: freezed == replyId
|
||||
? _value.replyId
|
||||
: replyId // ignore: cast_nullable_to_non_nullable
|
||||
as int?,
|
||||
));
|
||||
$Res call({Object? comment = null, Object? replyId = freezed}) {
|
||||
return _then(
|
||||
_$CommentsStateLoadedImpl(
|
||||
comment:
|
||||
null == comment
|
||||
? _value.comment
|
||||
: comment // ignore: cast_nullable_to_non_nullable
|
||||
as CommentModel,
|
||||
replyId:
|
||||
freezed == replyId
|
||||
? _value.replyId
|
||||
: replyId // ignore: cast_nullable_to_non_nullable
|
||||
as int?,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
/// Create a copy of CommentsState
|
||||
@@ -408,7 +411,9 @@ class _$CommentsStateLoadedImpl implements CommentsStateLoaded {
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$CommentsStateLoadedImplCopyWith<_$CommentsStateLoadedImpl> get copyWith =>
|
||||
__$$CommentsStateLoadedImplCopyWithImpl<_$CommentsStateLoadedImpl>(
|
||||
this, _$identity);
|
||||
this,
|
||||
_$identity,
|
||||
);
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
@@ -486,9 +491,10 @@ class _$CommentsStateLoadedImpl implements CommentsStateLoaded {
|
||||
}
|
||||
|
||||
abstract class CommentsStateLoaded implements CommentsState {
|
||||
const factory CommentsStateLoaded(
|
||||
{required final CommentModel comment,
|
||||
final int? replyId}) = _$CommentsStateLoadedImpl;
|
||||
const factory CommentsStateLoaded({
|
||||
required final CommentModel comment,
|
||||
final int? replyId,
|
||||
}) = _$CommentsStateLoadedImpl;
|
||||
|
||||
CommentModel get comment;
|
||||
int? get replyId;
|
||||
@@ -502,9 +508,10 @@ abstract class CommentsStateLoaded implements CommentsState {
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$CommentsStateErrorImplCopyWith<$Res> {
|
||||
factory _$$CommentsStateErrorImplCopyWith(_$CommentsStateErrorImpl value,
|
||||
$Res Function(_$CommentsStateErrorImpl) then) =
|
||||
__$$CommentsStateErrorImplCopyWithImpl<$Res>;
|
||||
factory _$$CommentsStateErrorImplCopyWith(
|
||||
_$CommentsStateErrorImpl value,
|
||||
$Res Function(_$CommentsStateErrorImpl) then,
|
||||
) = __$$CommentsStateErrorImplCopyWithImpl<$Res>;
|
||||
@useResult
|
||||
$Res call({String errorMessage});
|
||||
}
|
||||
@@ -513,23 +520,25 @@ abstract class _$$CommentsStateErrorImplCopyWith<$Res> {
|
||||
class __$$CommentsStateErrorImplCopyWithImpl<$Res>
|
||||
extends _$CommentsStateCopyWithImpl<$Res, _$CommentsStateErrorImpl>
|
||||
implements _$$CommentsStateErrorImplCopyWith<$Res> {
|
||||
__$$CommentsStateErrorImplCopyWithImpl(_$CommentsStateErrorImpl _value,
|
||||
$Res Function(_$CommentsStateErrorImpl) _then)
|
||||
: super(_value, _then);
|
||||
__$$CommentsStateErrorImplCopyWithImpl(
|
||||
_$CommentsStateErrorImpl _value,
|
||||
$Res Function(_$CommentsStateErrorImpl) _then,
|
||||
) : super(_value, _then);
|
||||
|
||||
/// Create a copy of CommentsState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? errorMessage = null,
|
||||
}) {
|
||||
return _then(_$CommentsStateErrorImpl(
|
||||
errorMessage: null == errorMessage
|
||||
? _value.errorMessage
|
||||
: errorMessage // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
));
|
||||
$Res call({Object? errorMessage = null}) {
|
||||
return _then(
|
||||
_$CommentsStateErrorImpl(
|
||||
errorMessage:
|
||||
null == errorMessage
|
||||
? _value.errorMessage
|
||||
: errorMessage // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -565,7 +574,9 @@ class _$CommentsStateErrorImpl implements CommentsStateError {
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$CommentsStateErrorImplCopyWith<_$CommentsStateErrorImpl> get copyWith =>
|
||||
__$$CommentsStateErrorImplCopyWithImpl<_$CommentsStateErrorImpl>(
|
||||
this, _$identity);
|
||||
this,
|
||||
_$identity,
|
||||
);
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
|
||||
@@ -12,7 +12,8 @@ part of 'consultants_state.dart';
|
||||
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');
|
||||
'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',
|
||||
);
|
||||
|
||||
/// @nodoc
|
||||
mixin _$ConsultantsState {
|
||||
@@ -21,47 +22,46 @@ mixin _$ConsultantsState {
|
||||
TResult Function() $default, {
|
||||
required TResult Function() loading,
|
||||
required TResult Function(
|
||||
List<FeedConsultantModel> consultantsList, bool isLoading)
|
||||
loaded,
|
||||
List<FeedConsultantModel> consultantsList,
|
||||
bool isLoading,
|
||||
)
|
||||
loaded,
|
||||
required TResult Function(String errorMessage) error,
|
||||
}) =>
|
||||
throw _privateConstructorUsedError;
|
||||
}) => throw _privateConstructorUsedError;
|
||||
@optionalTypeArgs
|
||||
TResult? whenOrNull<TResult extends Object?>(
|
||||
TResult? Function()? $default, {
|
||||
TResult? Function()? loading,
|
||||
TResult? Function(
|
||||
List<FeedConsultantModel> consultantsList, bool isLoading)?
|
||||
loaded,
|
||||
List<FeedConsultantModel> consultantsList,
|
||||
bool isLoading,
|
||||
)?
|
||||
loaded,
|
||||
TResult? Function(String errorMessage)? error,
|
||||
}) =>
|
||||
throw _privateConstructorUsedError;
|
||||
}) => throw _privateConstructorUsedError;
|
||||
@optionalTypeArgs
|
||||
TResult maybeWhen<TResult extends Object?>(
|
||||
TResult Function()? $default, {
|
||||
TResult Function()? loading,
|
||||
TResult Function(List<FeedConsultantModel> consultantsList, bool isLoading)?
|
||||
loaded,
|
||||
loaded,
|
||||
TResult Function(String errorMessage)? error,
|
||||
required TResult orElse(),
|
||||
}) =>
|
||||
throw _privateConstructorUsedError;
|
||||
}) => throw _privateConstructorUsedError;
|
||||
@optionalTypeArgs
|
||||
TResult map<TResult extends Object?>(
|
||||
TResult Function(_ConsultantsState value) $default, {
|
||||
required TResult Function(ConsultantsStateLoading value) loading,
|
||||
required TResult Function(ConsultantsStateLoaded value) loaded,
|
||||
required TResult Function(ConsultantsStateError value) error,
|
||||
}) =>
|
||||
throw _privateConstructorUsedError;
|
||||
}) => throw _privateConstructorUsedError;
|
||||
@optionalTypeArgs
|
||||
TResult? mapOrNull<TResult extends Object?>(
|
||||
TResult? Function(_ConsultantsState value)? $default, {
|
||||
TResult? Function(ConsultantsStateLoading value)? loading,
|
||||
TResult? Function(ConsultantsStateLoaded value)? loaded,
|
||||
TResult? Function(ConsultantsStateError value)? error,
|
||||
}) =>
|
||||
throw _privateConstructorUsedError;
|
||||
}) => throw _privateConstructorUsedError;
|
||||
@optionalTypeArgs
|
||||
TResult maybeMap<TResult extends Object?>(
|
||||
TResult Function(_ConsultantsState value)? $default, {
|
||||
@@ -69,15 +69,15 @@ mixin _$ConsultantsState {
|
||||
TResult Function(ConsultantsStateLoaded value)? loaded,
|
||||
TResult Function(ConsultantsStateError value)? error,
|
||||
required TResult orElse(),
|
||||
}) =>
|
||||
throw _privateConstructorUsedError;
|
||||
}) => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $ConsultantsStateCopyWith<$Res> {
|
||||
factory $ConsultantsStateCopyWith(
|
||||
ConsultantsState value, $Res Function(ConsultantsState) then) =
|
||||
_$ConsultantsStateCopyWithImpl<$Res, ConsultantsState>;
|
||||
ConsultantsState value,
|
||||
$Res Function(ConsultantsState) then,
|
||||
) = _$ConsultantsStateCopyWithImpl<$Res, ConsultantsState>;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@@ -96,18 +96,20 @@ class _$ConsultantsStateCopyWithImpl<$Res, $Val extends ConsultantsState>
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$ConsultantsStateImplCopyWith<$Res> {
|
||||
factory _$$ConsultantsStateImplCopyWith(_$ConsultantsStateImpl value,
|
||||
$Res Function(_$ConsultantsStateImpl) then) =
|
||||
__$$ConsultantsStateImplCopyWithImpl<$Res>;
|
||||
factory _$$ConsultantsStateImplCopyWith(
|
||||
_$ConsultantsStateImpl value,
|
||||
$Res Function(_$ConsultantsStateImpl) then,
|
||||
) = __$$ConsultantsStateImplCopyWithImpl<$Res>;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$ConsultantsStateImplCopyWithImpl<$Res>
|
||||
extends _$ConsultantsStateCopyWithImpl<$Res, _$ConsultantsStateImpl>
|
||||
implements _$$ConsultantsStateImplCopyWith<$Res> {
|
||||
__$$ConsultantsStateImplCopyWithImpl(_$ConsultantsStateImpl _value,
|
||||
$Res Function(_$ConsultantsStateImpl) _then)
|
||||
: super(_value, _then);
|
||||
__$$ConsultantsStateImplCopyWithImpl(
|
||||
_$ConsultantsStateImpl _value,
|
||||
$Res Function(_$ConsultantsStateImpl) _then,
|
||||
) : super(_value, _then);
|
||||
|
||||
/// Create a copy of ConsultantsState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -138,8 +140,10 @@ class _$ConsultantsStateImpl implements _ConsultantsState {
|
||||
TResult Function() $default, {
|
||||
required TResult Function() loading,
|
||||
required TResult Function(
|
||||
List<FeedConsultantModel> consultantsList, bool isLoading)
|
||||
loaded,
|
||||
List<FeedConsultantModel> consultantsList,
|
||||
bool isLoading,
|
||||
)
|
||||
loaded,
|
||||
required TResult Function(String errorMessage) error,
|
||||
}) {
|
||||
return $default();
|
||||
@@ -151,8 +155,10 @@ class _$ConsultantsStateImpl implements _ConsultantsState {
|
||||
TResult? Function()? $default, {
|
||||
TResult? Function()? loading,
|
||||
TResult? Function(
|
||||
List<FeedConsultantModel> consultantsList, bool isLoading)?
|
||||
loaded,
|
||||
List<FeedConsultantModel> consultantsList,
|
||||
bool isLoading,
|
||||
)?
|
||||
loaded,
|
||||
TResult? Function(String errorMessage)? error,
|
||||
}) {
|
||||
return $default?.call();
|
||||
@@ -164,7 +170,7 @@ class _$ConsultantsStateImpl implements _ConsultantsState {
|
||||
TResult Function()? $default, {
|
||||
TResult Function()? loading,
|
||||
TResult Function(List<FeedConsultantModel> consultantsList, bool isLoading)?
|
||||
loaded,
|
||||
loaded,
|
||||
TResult Function(String errorMessage)? error,
|
||||
required TResult orElse(),
|
||||
}) {
|
||||
@@ -219,9 +225,9 @@ abstract class _ConsultantsState implements ConsultantsState {
|
||||
/// @nodoc
|
||||
abstract class _$$ConsultantsStateLoadingImplCopyWith<$Res> {
|
||||
factory _$$ConsultantsStateLoadingImplCopyWith(
|
||||
_$ConsultantsStateLoadingImpl value,
|
||||
$Res Function(_$ConsultantsStateLoadingImpl) then) =
|
||||
__$$ConsultantsStateLoadingImplCopyWithImpl<$Res>;
|
||||
_$ConsultantsStateLoadingImpl value,
|
||||
$Res Function(_$ConsultantsStateLoadingImpl) then,
|
||||
) = __$$ConsultantsStateLoadingImplCopyWithImpl<$Res>;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@@ -229,9 +235,9 @@ class __$$ConsultantsStateLoadingImplCopyWithImpl<$Res>
|
||||
extends _$ConsultantsStateCopyWithImpl<$Res, _$ConsultantsStateLoadingImpl>
|
||||
implements _$$ConsultantsStateLoadingImplCopyWith<$Res> {
|
||||
__$$ConsultantsStateLoadingImplCopyWithImpl(
|
||||
_$ConsultantsStateLoadingImpl _value,
|
||||
$Res Function(_$ConsultantsStateLoadingImpl) _then)
|
||||
: super(_value, _then);
|
||||
_$ConsultantsStateLoadingImpl _value,
|
||||
$Res Function(_$ConsultantsStateLoadingImpl) _then,
|
||||
) : super(_value, _then);
|
||||
|
||||
/// Create a copy of ConsultantsState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -263,8 +269,10 @@ class _$ConsultantsStateLoadingImpl implements ConsultantsStateLoading {
|
||||
TResult Function() $default, {
|
||||
required TResult Function() loading,
|
||||
required TResult Function(
|
||||
List<FeedConsultantModel> consultantsList, bool isLoading)
|
||||
loaded,
|
||||
List<FeedConsultantModel> consultantsList,
|
||||
bool isLoading,
|
||||
)
|
||||
loaded,
|
||||
required TResult Function(String errorMessage) error,
|
||||
}) {
|
||||
return loading();
|
||||
@@ -276,8 +284,10 @@ class _$ConsultantsStateLoadingImpl implements ConsultantsStateLoading {
|
||||
TResult? Function()? $default, {
|
||||
TResult? Function()? loading,
|
||||
TResult? Function(
|
||||
List<FeedConsultantModel> consultantsList, bool isLoading)?
|
||||
loaded,
|
||||
List<FeedConsultantModel> consultantsList,
|
||||
bool isLoading,
|
||||
)?
|
||||
loaded,
|
||||
TResult? Function(String errorMessage)? error,
|
||||
}) {
|
||||
return loading?.call();
|
||||
@@ -289,7 +299,7 @@ class _$ConsultantsStateLoadingImpl implements ConsultantsStateLoading {
|
||||
TResult Function()? $default, {
|
||||
TResult Function()? loading,
|
||||
TResult Function(List<FeedConsultantModel> consultantsList, bool isLoading)?
|
||||
loaded,
|
||||
loaded,
|
||||
TResult Function(String errorMessage)? error,
|
||||
required TResult orElse(),
|
||||
}) {
|
||||
@@ -344,9 +354,9 @@ abstract class ConsultantsStateLoading implements ConsultantsState {
|
||||
/// @nodoc
|
||||
abstract class _$$ConsultantsStateLoadedImplCopyWith<$Res> {
|
||||
factory _$$ConsultantsStateLoadedImplCopyWith(
|
||||
_$ConsultantsStateLoadedImpl value,
|
||||
$Res Function(_$ConsultantsStateLoadedImpl) then) =
|
||||
__$$ConsultantsStateLoadedImplCopyWithImpl<$Res>;
|
||||
_$ConsultantsStateLoadedImpl value,
|
||||
$Res Function(_$ConsultantsStateLoadedImpl) then,
|
||||
) = __$$ConsultantsStateLoadedImplCopyWithImpl<$Res>;
|
||||
@useResult
|
||||
$Res call({List<FeedConsultantModel> consultantsList, bool isLoading});
|
||||
}
|
||||
@@ -356,38 +366,39 @@ class __$$ConsultantsStateLoadedImplCopyWithImpl<$Res>
|
||||
extends _$ConsultantsStateCopyWithImpl<$Res, _$ConsultantsStateLoadedImpl>
|
||||
implements _$$ConsultantsStateLoadedImplCopyWith<$Res> {
|
||||
__$$ConsultantsStateLoadedImplCopyWithImpl(
|
||||
_$ConsultantsStateLoadedImpl _value,
|
||||
$Res Function(_$ConsultantsStateLoadedImpl) _then)
|
||||
: super(_value, _then);
|
||||
_$ConsultantsStateLoadedImpl _value,
|
||||
$Res Function(_$ConsultantsStateLoadedImpl) _then,
|
||||
) : super(_value, _then);
|
||||
|
||||
/// Create a copy of ConsultantsState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? consultantsList = null,
|
||||
Object? isLoading = null,
|
||||
}) {
|
||||
return _then(_$ConsultantsStateLoadedImpl(
|
||||
consultantsList: null == consultantsList
|
||||
? _value._consultantsList
|
||||
: consultantsList // ignore: cast_nullable_to_non_nullable
|
||||
as List<FeedConsultantModel>,
|
||||
isLoading: null == isLoading
|
||||
? _value.isLoading
|
||||
: isLoading // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
));
|
||||
$Res call({Object? consultantsList = null, Object? isLoading = null}) {
|
||||
return _then(
|
||||
_$ConsultantsStateLoadedImpl(
|
||||
consultantsList:
|
||||
null == consultantsList
|
||||
? _value._consultantsList
|
||||
: consultantsList // ignore: cast_nullable_to_non_nullable
|
||||
as List<FeedConsultantModel>,
|
||||
isLoading:
|
||||
null == isLoading
|
||||
? _value.isLoading
|
||||
: isLoading // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
|
||||
class _$ConsultantsStateLoadedImpl implements ConsultantsStateLoaded {
|
||||
const _$ConsultantsStateLoadedImpl(
|
||||
{required final List<FeedConsultantModel> consultantsList,
|
||||
required this.isLoading})
|
||||
: _consultantsList = consultantsList;
|
||||
const _$ConsultantsStateLoadedImpl({
|
||||
required final List<FeedConsultantModel> consultantsList,
|
||||
required this.isLoading,
|
||||
}) : _consultantsList = consultantsList;
|
||||
|
||||
final List<FeedConsultantModel> _consultantsList;
|
||||
@override
|
||||
@@ -410,15 +421,20 @@ class _$ConsultantsStateLoadedImpl implements ConsultantsStateLoaded {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$ConsultantsStateLoadedImpl &&
|
||||
const DeepCollectionEquality()
|
||||
.equals(other._consultantsList, _consultantsList) &&
|
||||
const DeepCollectionEquality().equals(
|
||||
other._consultantsList,
|
||||
_consultantsList,
|
||||
) &&
|
||||
(identical(other.isLoading, isLoading) ||
|
||||
other.isLoading == isLoading));
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,
|
||||
const DeepCollectionEquality().hash(_consultantsList), isLoading);
|
||||
int get hashCode => Object.hash(
|
||||
runtimeType,
|
||||
const DeepCollectionEquality().hash(_consultantsList),
|
||||
isLoading,
|
||||
);
|
||||
|
||||
/// Create a copy of ConsultantsState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -426,8 +442,11 @@ class _$ConsultantsStateLoadedImpl implements ConsultantsStateLoaded {
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$ConsultantsStateLoadedImplCopyWith<_$ConsultantsStateLoadedImpl>
|
||||
get copyWith => __$$ConsultantsStateLoadedImplCopyWithImpl<
|
||||
_$ConsultantsStateLoadedImpl>(this, _$identity);
|
||||
get copyWith =>
|
||||
__$$ConsultantsStateLoadedImplCopyWithImpl<_$ConsultantsStateLoadedImpl>(
|
||||
this,
|
||||
_$identity,
|
||||
);
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
@@ -435,8 +454,10 @@ class _$ConsultantsStateLoadedImpl implements ConsultantsStateLoaded {
|
||||
TResult Function() $default, {
|
||||
required TResult Function() loading,
|
||||
required TResult Function(
|
||||
List<FeedConsultantModel> consultantsList, bool isLoading)
|
||||
loaded,
|
||||
List<FeedConsultantModel> consultantsList,
|
||||
bool isLoading,
|
||||
)
|
||||
loaded,
|
||||
required TResult Function(String errorMessage) error,
|
||||
}) {
|
||||
return loaded(consultantsList, isLoading);
|
||||
@@ -448,8 +469,10 @@ class _$ConsultantsStateLoadedImpl implements ConsultantsStateLoaded {
|
||||
TResult? Function()? $default, {
|
||||
TResult? Function()? loading,
|
||||
TResult? Function(
|
||||
List<FeedConsultantModel> consultantsList, bool isLoading)?
|
||||
loaded,
|
||||
List<FeedConsultantModel> consultantsList,
|
||||
bool isLoading,
|
||||
)?
|
||||
loaded,
|
||||
TResult? Function(String errorMessage)? error,
|
||||
}) {
|
||||
return loaded?.call(consultantsList, isLoading);
|
||||
@@ -461,7 +484,7 @@ class _$ConsultantsStateLoadedImpl implements ConsultantsStateLoaded {
|
||||
TResult Function()? $default, {
|
||||
TResult Function()? loading,
|
||||
TResult Function(List<FeedConsultantModel> consultantsList, bool isLoading)?
|
||||
loaded,
|
||||
loaded,
|
||||
TResult Function(String errorMessage)? error,
|
||||
required TResult orElse(),
|
||||
}) {
|
||||
@@ -510,9 +533,10 @@ class _$ConsultantsStateLoadedImpl implements ConsultantsStateLoaded {
|
||||
}
|
||||
|
||||
abstract class ConsultantsStateLoaded implements ConsultantsState {
|
||||
const factory ConsultantsStateLoaded(
|
||||
{required final List<FeedConsultantModel> consultantsList,
|
||||
required final bool isLoading}) = _$ConsultantsStateLoadedImpl;
|
||||
const factory ConsultantsStateLoaded({
|
||||
required final List<FeedConsultantModel> consultantsList,
|
||||
required final bool isLoading,
|
||||
}) = _$ConsultantsStateLoadedImpl;
|
||||
|
||||
List<FeedConsultantModel> get consultantsList;
|
||||
bool get isLoading;
|
||||
@@ -521,15 +545,15 @@ abstract class ConsultantsStateLoaded implements ConsultantsState {
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$ConsultantsStateLoadedImplCopyWith<_$ConsultantsStateLoadedImpl>
|
||||
get copyWith => throw _privateConstructorUsedError;
|
||||
get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$ConsultantsStateErrorImplCopyWith<$Res> {
|
||||
factory _$$ConsultantsStateErrorImplCopyWith(
|
||||
_$ConsultantsStateErrorImpl value,
|
||||
$Res Function(_$ConsultantsStateErrorImpl) then) =
|
||||
__$$ConsultantsStateErrorImplCopyWithImpl<$Res>;
|
||||
_$ConsultantsStateErrorImpl value,
|
||||
$Res Function(_$ConsultantsStateErrorImpl) then,
|
||||
) = __$$ConsultantsStateErrorImplCopyWithImpl<$Res>;
|
||||
@useResult
|
||||
$Res call({String errorMessage});
|
||||
}
|
||||
@@ -538,23 +562,25 @@ abstract class _$$ConsultantsStateErrorImplCopyWith<$Res> {
|
||||
class __$$ConsultantsStateErrorImplCopyWithImpl<$Res>
|
||||
extends _$ConsultantsStateCopyWithImpl<$Res, _$ConsultantsStateErrorImpl>
|
||||
implements _$$ConsultantsStateErrorImplCopyWith<$Res> {
|
||||
__$$ConsultantsStateErrorImplCopyWithImpl(_$ConsultantsStateErrorImpl _value,
|
||||
$Res Function(_$ConsultantsStateErrorImpl) _then)
|
||||
: super(_value, _then);
|
||||
__$$ConsultantsStateErrorImplCopyWithImpl(
|
||||
_$ConsultantsStateErrorImpl _value,
|
||||
$Res Function(_$ConsultantsStateErrorImpl) _then,
|
||||
) : super(_value, _then);
|
||||
|
||||
/// Create a copy of ConsultantsState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? errorMessage = null,
|
||||
}) {
|
||||
return _then(_$ConsultantsStateErrorImpl(
|
||||
errorMessage: null == errorMessage
|
||||
? _value.errorMessage
|
||||
: errorMessage // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
));
|
||||
$Res call({Object? errorMessage = null}) {
|
||||
return _then(
|
||||
_$ConsultantsStateErrorImpl(
|
||||
errorMessage:
|
||||
null == errorMessage
|
||||
? _value.errorMessage
|
||||
: errorMessage // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -589,8 +615,11 @@ class _$ConsultantsStateErrorImpl implements ConsultantsStateError {
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$ConsultantsStateErrorImplCopyWith<_$ConsultantsStateErrorImpl>
|
||||
get copyWith => __$$ConsultantsStateErrorImplCopyWithImpl<
|
||||
_$ConsultantsStateErrorImpl>(this, _$identity);
|
||||
get copyWith =>
|
||||
__$$ConsultantsStateErrorImplCopyWithImpl<_$ConsultantsStateErrorImpl>(
|
||||
this,
|
||||
_$identity,
|
||||
);
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
@@ -598,8 +627,10 @@ class _$ConsultantsStateErrorImpl implements ConsultantsStateError {
|
||||
TResult Function() $default, {
|
||||
required TResult Function() loading,
|
||||
required TResult Function(
|
||||
List<FeedConsultantModel> consultantsList, bool isLoading)
|
||||
loaded,
|
||||
List<FeedConsultantModel> consultantsList,
|
||||
bool isLoading,
|
||||
)
|
||||
loaded,
|
||||
required TResult Function(String errorMessage) error,
|
||||
}) {
|
||||
return error(errorMessage);
|
||||
@@ -611,8 +642,10 @@ class _$ConsultantsStateErrorImpl implements ConsultantsStateError {
|
||||
TResult? Function()? $default, {
|
||||
TResult? Function()? loading,
|
||||
TResult? Function(
|
||||
List<FeedConsultantModel> consultantsList, bool isLoading)?
|
||||
loaded,
|
||||
List<FeedConsultantModel> consultantsList,
|
||||
bool isLoading,
|
||||
)?
|
||||
loaded,
|
||||
TResult? Function(String errorMessage)? error,
|
||||
}) {
|
||||
return error?.call(errorMessage);
|
||||
@@ -624,7 +657,7 @@ class _$ConsultantsStateErrorImpl implements ConsultantsStateError {
|
||||
TResult Function()? $default, {
|
||||
TResult Function()? loading,
|
||||
TResult Function(List<FeedConsultantModel> consultantsList, bool isLoading)?
|
||||
loaded,
|
||||
loaded,
|
||||
TResult Function(String errorMessage)? error,
|
||||
required TResult orElse(),
|
||||
}) {
|
||||
@@ -682,5 +715,5 @@ abstract class ConsultantsStateError implements ConsultantsState {
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$ConsultantsStateErrorImplCopyWith<_$ConsultantsStateErrorImpl>
|
||||
get copyWith => throw _privateConstructorUsedError;
|
||||
get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -12,7 +12,8 @@ part of 'diets_state.dart';
|
||||
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');
|
||||
'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',
|
||||
);
|
||||
|
||||
/// @nodoc
|
||||
mixin _$DietsState {
|
||||
@@ -31,14 +32,16 @@ mixin _$DietsState {
|
||||
/// @nodoc
|
||||
abstract class $DietsStateCopyWith<$Res> {
|
||||
factory $DietsStateCopyWith(
|
||||
DietsState value, $Res Function(DietsState) then) =
|
||||
_$DietsStateCopyWithImpl<$Res, DietsState>;
|
||||
DietsState value,
|
||||
$Res Function(DietsState) then,
|
||||
) = _$DietsStateCopyWithImpl<$Res, DietsState>;
|
||||
@useResult
|
||||
$Res call(
|
||||
{DietsFilterState filterState,
|
||||
List<Diet> dietsList,
|
||||
bool isLoading,
|
||||
String? errorMessage});
|
||||
$Res call({
|
||||
DietsFilterState filterState,
|
||||
List<Diet> dietsList,
|
||||
bool isLoading,
|
||||
String? errorMessage,
|
||||
});
|
||||
|
||||
$DietsFilterStateCopyWith<$Res> get filterState;
|
||||
}
|
||||
@@ -63,24 +66,31 @@ class _$DietsStateCopyWithImpl<$Res, $Val extends DietsState>
|
||||
Object? isLoading = null,
|
||||
Object? errorMessage = freezed,
|
||||
}) {
|
||||
return _then(_value.copyWith(
|
||||
filterState: null == filterState
|
||||
? _value.filterState
|
||||
: filterState // ignore: cast_nullable_to_non_nullable
|
||||
as DietsFilterState,
|
||||
dietsList: null == dietsList
|
||||
? _value.dietsList
|
||||
: dietsList // ignore: cast_nullable_to_non_nullable
|
||||
as List<Diet>,
|
||||
isLoading: null == isLoading
|
||||
? _value.isLoading
|
||||
: isLoading // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
errorMessage: freezed == errorMessage
|
||||
? _value.errorMessage
|
||||
: errorMessage // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
) as $Val);
|
||||
return _then(
|
||||
_value.copyWith(
|
||||
filterState:
|
||||
null == filterState
|
||||
? _value.filterState
|
||||
: filterState // ignore: cast_nullable_to_non_nullable
|
||||
as DietsFilterState,
|
||||
dietsList:
|
||||
null == dietsList
|
||||
? _value.dietsList
|
||||
: dietsList // ignore: cast_nullable_to_non_nullable
|
||||
as List<Diet>,
|
||||
isLoading:
|
||||
null == isLoading
|
||||
? _value.isLoading
|
||||
: isLoading // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
errorMessage:
|
||||
freezed == errorMessage
|
||||
? _value.errorMessage
|
||||
: errorMessage // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
)
|
||||
as $Val,
|
||||
);
|
||||
}
|
||||
|
||||
/// Create a copy of DietsState
|
||||
@@ -98,15 +108,17 @@ class _$DietsStateCopyWithImpl<$Res, $Val extends DietsState>
|
||||
abstract class _$$DietsStateImplCopyWith<$Res>
|
||||
implements $DietsStateCopyWith<$Res> {
|
||||
factory _$$DietsStateImplCopyWith(
|
||||
_$DietsStateImpl value, $Res Function(_$DietsStateImpl) then) =
|
||||
__$$DietsStateImplCopyWithImpl<$Res>;
|
||||
_$DietsStateImpl value,
|
||||
$Res Function(_$DietsStateImpl) then,
|
||||
) = __$$DietsStateImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call(
|
||||
{DietsFilterState filterState,
|
||||
List<Diet> dietsList,
|
||||
bool isLoading,
|
||||
String? errorMessage});
|
||||
$Res call({
|
||||
DietsFilterState filterState,
|
||||
List<Diet> dietsList,
|
||||
bool isLoading,
|
||||
String? errorMessage,
|
||||
});
|
||||
|
||||
@override
|
||||
$DietsFilterStateCopyWith<$Res> get filterState;
|
||||
@@ -117,8 +129,9 @@ class __$$DietsStateImplCopyWithImpl<$Res>
|
||||
extends _$DietsStateCopyWithImpl<$Res, _$DietsStateImpl>
|
||||
implements _$$DietsStateImplCopyWith<$Res> {
|
||||
__$$DietsStateImplCopyWithImpl(
|
||||
_$DietsStateImpl _value, $Res Function(_$DietsStateImpl) _then)
|
||||
: super(_value, _then);
|
||||
_$DietsStateImpl _value,
|
||||
$Res Function(_$DietsStateImpl) _then,
|
||||
) : super(_value, _then);
|
||||
|
||||
/// Create a copy of DietsState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -130,36 +143,42 @@ class __$$DietsStateImplCopyWithImpl<$Res>
|
||||
Object? isLoading = null,
|
||||
Object? errorMessage = freezed,
|
||||
}) {
|
||||
return _then(_$DietsStateImpl(
|
||||
filterState: null == filterState
|
||||
? _value.filterState
|
||||
: filterState // ignore: cast_nullable_to_non_nullable
|
||||
as DietsFilterState,
|
||||
dietsList: null == dietsList
|
||||
? _value._dietsList
|
||||
: dietsList // ignore: cast_nullable_to_non_nullable
|
||||
as List<Diet>,
|
||||
isLoading: null == isLoading
|
||||
? _value.isLoading
|
||||
: isLoading // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
errorMessage: freezed == errorMessage
|
||||
? _value.errorMessage
|
||||
: errorMessage // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
));
|
||||
return _then(
|
||||
_$DietsStateImpl(
|
||||
filterState:
|
||||
null == filterState
|
||||
? _value.filterState
|
||||
: filterState // ignore: cast_nullable_to_non_nullable
|
||||
as DietsFilterState,
|
||||
dietsList:
|
||||
null == dietsList
|
||||
? _value._dietsList
|
||||
: dietsList // ignore: cast_nullable_to_non_nullable
|
||||
as List<Diet>,
|
||||
isLoading:
|
||||
null == isLoading
|
||||
? _value.isLoading
|
||||
: isLoading // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
errorMessage:
|
||||
freezed == errorMessage
|
||||
? _value.errorMessage
|
||||
: errorMessage // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
|
||||
class _$DietsStateImpl implements _DietsState {
|
||||
const _$DietsStateImpl(
|
||||
{required this.filterState,
|
||||
required final List<Diet> dietsList,
|
||||
required this.isLoading,
|
||||
required this.errorMessage})
|
||||
: _dietsList = dietsList;
|
||||
const _$DietsStateImpl({
|
||||
required this.filterState,
|
||||
required final List<Diet> dietsList,
|
||||
required this.isLoading,
|
||||
required this.errorMessage,
|
||||
}) : _dietsList = dietsList;
|
||||
|
||||
@override
|
||||
final DietsFilterState filterState;
|
||||
@@ -188,8 +207,10 @@ class _$DietsStateImpl implements _DietsState {
|
||||
other is _$DietsStateImpl &&
|
||||
(identical(other.filterState, filterState) ||
|
||||
other.filterState == filterState) &&
|
||||
const DeepCollectionEquality()
|
||||
.equals(other._dietsList, _dietsList) &&
|
||||
const DeepCollectionEquality().equals(
|
||||
other._dietsList,
|
||||
_dietsList,
|
||||
) &&
|
||||
(identical(other.isLoading, isLoading) ||
|
||||
other.isLoading == isLoading) &&
|
||||
(identical(other.errorMessage, errorMessage) ||
|
||||
@@ -197,8 +218,13 @@ class _$DietsStateImpl implements _DietsState {
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType, filterState,
|
||||
const DeepCollectionEquality().hash(_dietsList), isLoading, errorMessage);
|
||||
int get hashCode => Object.hash(
|
||||
runtimeType,
|
||||
filterState,
|
||||
const DeepCollectionEquality().hash(_dietsList),
|
||||
isLoading,
|
||||
errorMessage,
|
||||
);
|
||||
|
||||
/// Create a copy of DietsState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -210,11 +236,12 @@ class _$DietsStateImpl implements _DietsState {
|
||||
}
|
||||
|
||||
abstract class _DietsState implements DietsState {
|
||||
const factory _DietsState(
|
||||
{required final DietsFilterState filterState,
|
||||
required final List<Diet> dietsList,
|
||||
required final bool isLoading,
|
||||
required final String? errorMessage}) = _$DietsStateImpl;
|
||||
const factory _DietsState({
|
||||
required final DietsFilterState filterState,
|
||||
required final List<Diet> dietsList,
|
||||
required final bool isLoading,
|
||||
required final String? errorMessage,
|
||||
}) = _$DietsStateImpl;
|
||||
|
||||
@override
|
||||
DietsFilterState get filterState;
|
||||
@@ -249,8 +276,9 @@ mixin _$DietsFilterState {
|
||||
/// @nodoc
|
||||
abstract class $DietsFilterStateCopyWith<$Res> {
|
||||
factory $DietsFilterStateCopyWith(
|
||||
DietsFilterState value, $Res Function(DietsFilterState) then) =
|
||||
_$DietsFilterStateCopyWithImpl<$Res, DietsFilterState>;
|
||||
DietsFilterState value,
|
||||
$Res Function(DietsFilterState) then,
|
||||
) = _$DietsFilterStateCopyWithImpl<$Res, DietsFilterState>;
|
||||
@useResult
|
||||
$Res call({int sortingIndex, int durationIndex, int typeIndex});
|
||||
}
|
||||
@@ -274,29 +302,36 @@ class _$DietsFilterStateCopyWithImpl<$Res, $Val extends DietsFilterState>
|
||||
Object? durationIndex = null,
|
||||
Object? typeIndex = null,
|
||||
}) {
|
||||
return _then(_value.copyWith(
|
||||
sortingIndex: null == sortingIndex
|
||||
? _value.sortingIndex
|
||||
: sortingIndex // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
durationIndex: null == durationIndex
|
||||
? _value.durationIndex
|
||||
: durationIndex // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
typeIndex: null == typeIndex
|
||||
? _value.typeIndex
|
||||
: typeIndex // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
) as $Val);
|
||||
return _then(
|
||||
_value.copyWith(
|
||||
sortingIndex:
|
||||
null == sortingIndex
|
||||
? _value.sortingIndex
|
||||
: sortingIndex // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
durationIndex:
|
||||
null == durationIndex
|
||||
? _value.durationIndex
|
||||
: durationIndex // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
typeIndex:
|
||||
null == typeIndex
|
||||
? _value.typeIndex
|
||||
: typeIndex // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
)
|
||||
as $Val,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$DietsFilterStateImplCopyWith<$Res>
|
||||
implements $DietsFilterStateCopyWith<$Res> {
|
||||
factory _$$DietsFilterStateImplCopyWith(_$DietsFilterStateImpl value,
|
||||
$Res Function(_$DietsFilterStateImpl) then) =
|
||||
__$$DietsFilterStateImplCopyWithImpl<$Res>;
|
||||
factory _$$DietsFilterStateImplCopyWith(
|
||||
_$DietsFilterStateImpl value,
|
||||
$Res Function(_$DietsFilterStateImpl) then,
|
||||
) = __$$DietsFilterStateImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call({int sortingIndex, int durationIndex, int typeIndex});
|
||||
@@ -306,9 +341,10 @@ abstract class _$$DietsFilterStateImplCopyWith<$Res>
|
||||
class __$$DietsFilterStateImplCopyWithImpl<$Res>
|
||||
extends _$DietsFilterStateCopyWithImpl<$Res, _$DietsFilterStateImpl>
|
||||
implements _$$DietsFilterStateImplCopyWith<$Res> {
|
||||
__$$DietsFilterStateImplCopyWithImpl(_$DietsFilterStateImpl _value,
|
||||
$Res Function(_$DietsFilterStateImpl) _then)
|
||||
: super(_value, _then);
|
||||
__$$DietsFilterStateImplCopyWithImpl(
|
||||
_$DietsFilterStateImpl _value,
|
||||
$Res Function(_$DietsFilterStateImpl) _then,
|
||||
) : super(_value, _then);
|
||||
|
||||
/// Create a copy of DietsFilterState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -319,30 +355,36 @@ class __$$DietsFilterStateImplCopyWithImpl<$Res>
|
||||
Object? durationIndex = null,
|
||||
Object? typeIndex = null,
|
||||
}) {
|
||||
return _then(_$DietsFilterStateImpl(
|
||||
sortingIndex: null == sortingIndex
|
||||
? _value.sortingIndex
|
||||
: sortingIndex // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
durationIndex: null == durationIndex
|
||||
? _value.durationIndex
|
||||
: durationIndex // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
typeIndex: null == typeIndex
|
||||
? _value.typeIndex
|
||||
: typeIndex // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
));
|
||||
return _then(
|
||||
_$DietsFilterStateImpl(
|
||||
sortingIndex:
|
||||
null == sortingIndex
|
||||
? _value.sortingIndex
|
||||
: sortingIndex // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
durationIndex:
|
||||
null == durationIndex
|
||||
? _value.durationIndex
|
||||
: durationIndex // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
typeIndex:
|
||||
null == typeIndex
|
||||
? _value.typeIndex
|
||||
: typeIndex // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
|
||||
class _$DietsFilterStateImpl implements _DietsFilterState {
|
||||
const _$DietsFilterStateImpl(
|
||||
{required this.sortingIndex,
|
||||
required this.durationIndex,
|
||||
required this.typeIndex});
|
||||
const _$DietsFilterStateImpl({
|
||||
required this.sortingIndex,
|
||||
required this.durationIndex,
|
||||
required this.typeIndex,
|
||||
});
|
||||
|
||||
@override
|
||||
final int sortingIndex;
|
||||
@@ -380,14 +422,17 @@ class _$DietsFilterStateImpl implements _DietsFilterState {
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$DietsFilterStateImplCopyWith<_$DietsFilterStateImpl> get copyWith =>
|
||||
__$$DietsFilterStateImplCopyWithImpl<_$DietsFilterStateImpl>(
|
||||
this, _$identity);
|
||||
this,
|
||||
_$identity,
|
||||
);
|
||||
}
|
||||
|
||||
abstract class _DietsFilterState implements DietsFilterState {
|
||||
const factory _DietsFilterState(
|
||||
{required final int sortingIndex,
|
||||
required final int durationIndex,
|
||||
required final int typeIndex}) = _$DietsFilterStateImpl;
|
||||
const factory _DietsFilterState({
|
||||
required final int sortingIndex,
|
||||
required final int durationIndex,
|
||||
required final int typeIndex,
|
||||
}) = _$DietsFilterStateImpl;
|
||||
|
||||
@override
|
||||
int get sortingIndex;
|
||||
|
||||
@@ -12,7 +12,8 @@ part of 'feed_state.dart';
|
||||
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');
|
||||
'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',
|
||||
);
|
||||
|
||||
/// @nodoc
|
||||
mixin _$FeedState {
|
||||
@@ -21,46 +22,43 @@ mixin _$FeedState {
|
||||
TResult Function() $default, {
|
||||
required TResult Function() loading,
|
||||
required TResult Function(
|
||||
List<FeedBlogPostModel> feedBlogPostList, bool isLoading)
|
||||
loaded,
|
||||
List<FeedBlogPostModel> feedBlogPostList,
|
||||
bool isLoading,
|
||||
)
|
||||
loaded,
|
||||
required TResult Function(String errorMessage) error,
|
||||
}) =>
|
||||
throw _privateConstructorUsedError;
|
||||
}) => throw _privateConstructorUsedError;
|
||||
@optionalTypeArgs
|
||||
TResult? whenOrNull<TResult extends Object?>(
|
||||
TResult? Function()? $default, {
|
||||
TResult? Function()? loading,
|
||||
TResult? Function(List<FeedBlogPostModel> feedBlogPostList, bool isLoading)?
|
||||
loaded,
|
||||
loaded,
|
||||
TResult? Function(String errorMessage)? error,
|
||||
}) =>
|
||||
throw _privateConstructorUsedError;
|
||||
}) => throw _privateConstructorUsedError;
|
||||
@optionalTypeArgs
|
||||
TResult maybeWhen<TResult extends Object?>(
|
||||
TResult Function()? $default, {
|
||||
TResult Function()? loading,
|
||||
TResult Function(List<FeedBlogPostModel> feedBlogPostList, bool isLoading)?
|
||||
loaded,
|
||||
loaded,
|
||||
TResult Function(String errorMessage)? error,
|
||||
required TResult orElse(),
|
||||
}) =>
|
||||
throw _privateConstructorUsedError;
|
||||
}) => throw _privateConstructorUsedError;
|
||||
@optionalTypeArgs
|
||||
TResult map<TResult extends Object?>(
|
||||
TResult Function(_FeedState value) $default, {
|
||||
required TResult Function(FeedStateLoading value) loading,
|
||||
required TResult Function(FeedStateLoaded value) loaded,
|
||||
required TResult Function(FeedStateError value) error,
|
||||
}) =>
|
||||
throw _privateConstructorUsedError;
|
||||
}) => throw _privateConstructorUsedError;
|
||||
@optionalTypeArgs
|
||||
TResult? mapOrNull<TResult extends Object?>(
|
||||
TResult? Function(_FeedState value)? $default, {
|
||||
TResult? Function(FeedStateLoading value)? loading,
|
||||
TResult? Function(FeedStateLoaded value)? loaded,
|
||||
TResult? Function(FeedStateError value)? error,
|
||||
}) =>
|
||||
throw _privateConstructorUsedError;
|
||||
}) => throw _privateConstructorUsedError;
|
||||
@optionalTypeArgs
|
||||
TResult maybeMap<TResult extends Object?>(
|
||||
TResult Function(_FeedState value)? $default, {
|
||||
@@ -68,8 +66,7 @@ mixin _$FeedState {
|
||||
TResult Function(FeedStateLoaded value)? loaded,
|
||||
TResult Function(FeedStateError value)? error,
|
||||
required TResult orElse(),
|
||||
}) =>
|
||||
throw _privateConstructorUsedError;
|
||||
}) => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@@ -95,8 +92,9 @@ class _$FeedStateCopyWithImpl<$Res, $Val extends FeedState>
|
||||
/// @nodoc
|
||||
abstract class _$$FeedStateImplCopyWith<$Res> {
|
||||
factory _$$FeedStateImplCopyWith(
|
||||
_$FeedStateImpl value, $Res Function(_$FeedStateImpl) then) =
|
||||
__$$FeedStateImplCopyWithImpl<$Res>;
|
||||
_$FeedStateImpl value,
|
||||
$Res Function(_$FeedStateImpl) then,
|
||||
) = __$$FeedStateImplCopyWithImpl<$Res>;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@@ -104,8 +102,9 @@ class __$$FeedStateImplCopyWithImpl<$Res>
|
||||
extends _$FeedStateCopyWithImpl<$Res, _$FeedStateImpl>
|
||||
implements _$$FeedStateImplCopyWith<$Res> {
|
||||
__$$FeedStateImplCopyWithImpl(
|
||||
_$FeedStateImpl _value, $Res Function(_$FeedStateImpl) _then)
|
||||
: super(_value, _then);
|
||||
_$FeedStateImpl _value,
|
||||
$Res Function(_$FeedStateImpl) _then,
|
||||
) : super(_value, _then);
|
||||
|
||||
/// Create a copy of FeedState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -136,8 +135,10 @@ class _$FeedStateImpl implements _FeedState {
|
||||
TResult Function() $default, {
|
||||
required TResult Function() loading,
|
||||
required TResult Function(
|
||||
List<FeedBlogPostModel> feedBlogPostList, bool isLoading)
|
||||
loaded,
|
||||
List<FeedBlogPostModel> feedBlogPostList,
|
||||
bool isLoading,
|
||||
)
|
||||
loaded,
|
||||
required TResult Function(String errorMessage) error,
|
||||
}) {
|
||||
return $default();
|
||||
@@ -149,7 +150,7 @@ class _$FeedStateImpl implements _FeedState {
|
||||
TResult? Function()? $default, {
|
||||
TResult? Function()? loading,
|
||||
TResult? Function(List<FeedBlogPostModel> feedBlogPostList, bool isLoading)?
|
||||
loaded,
|
||||
loaded,
|
||||
TResult? Function(String errorMessage)? error,
|
||||
}) {
|
||||
return $default?.call();
|
||||
@@ -161,7 +162,7 @@ class _$FeedStateImpl implements _FeedState {
|
||||
TResult Function()? $default, {
|
||||
TResult Function()? loading,
|
||||
TResult Function(List<FeedBlogPostModel> feedBlogPostList, bool isLoading)?
|
||||
loaded,
|
||||
loaded,
|
||||
TResult Function(String errorMessage)? error,
|
||||
required TResult orElse(),
|
||||
}) {
|
||||
@@ -215,18 +216,20 @@ abstract class _FeedState implements FeedState {
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$FeedStateLoadingImplCopyWith<$Res> {
|
||||
factory _$$FeedStateLoadingImplCopyWith(_$FeedStateLoadingImpl value,
|
||||
$Res Function(_$FeedStateLoadingImpl) then) =
|
||||
__$$FeedStateLoadingImplCopyWithImpl<$Res>;
|
||||
factory _$$FeedStateLoadingImplCopyWith(
|
||||
_$FeedStateLoadingImpl value,
|
||||
$Res Function(_$FeedStateLoadingImpl) then,
|
||||
) = __$$FeedStateLoadingImplCopyWithImpl<$Res>;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$FeedStateLoadingImplCopyWithImpl<$Res>
|
||||
extends _$FeedStateCopyWithImpl<$Res, _$FeedStateLoadingImpl>
|
||||
implements _$$FeedStateLoadingImplCopyWith<$Res> {
|
||||
__$$FeedStateLoadingImplCopyWithImpl(_$FeedStateLoadingImpl _value,
|
||||
$Res Function(_$FeedStateLoadingImpl) _then)
|
||||
: super(_value, _then);
|
||||
__$$FeedStateLoadingImplCopyWithImpl(
|
||||
_$FeedStateLoadingImpl _value,
|
||||
$Res Function(_$FeedStateLoadingImpl) _then,
|
||||
) : super(_value, _then);
|
||||
|
||||
/// Create a copy of FeedState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -257,8 +260,10 @@ class _$FeedStateLoadingImpl implements FeedStateLoading {
|
||||
TResult Function() $default, {
|
||||
required TResult Function() loading,
|
||||
required TResult Function(
|
||||
List<FeedBlogPostModel> feedBlogPostList, bool isLoading)
|
||||
loaded,
|
||||
List<FeedBlogPostModel> feedBlogPostList,
|
||||
bool isLoading,
|
||||
)
|
||||
loaded,
|
||||
required TResult Function(String errorMessage) error,
|
||||
}) {
|
||||
return loading();
|
||||
@@ -270,7 +275,7 @@ class _$FeedStateLoadingImpl implements FeedStateLoading {
|
||||
TResult? Function()? $default, {
|
||||
TResult? Function()? loading,
|
||||
TResult? Function(List<FeedBlogPostModel> feedBlogPostList, bool isLoading)?
|
||||
loaded,
|
||||
loaded,
|
||||
TResult? Function(String errorMessage)? error,
|
||||
}) {
|
||||
return loading?.call();
|
||||
@@ -282,7 +287,7 @@ class _$FeedStateLoadingImpl implements FeedStateLoading {
|
||||
TResult Function()? $default, {
|
||||
TResult Function()? loading,
|
||||
TResult Function(List<FeedBlogPostModel> feedBlogPostList, bool isLoading)?
|
||||
loaded,
|
||||
loaded,
|
||||
TResult Function(String errorMessage)? error,
|
||||
required TResult orElse(),
|
||||
}) {
|
||||
@@ -336,9 +341,10 @@ abstract class FeedStateLoading implements FeedState {
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$FeedStateLoadedImplCopyWith<$Res> {
|
||||
factory _$$FeedStateLoadedImplCopyWith(_$FeedStateLoadedImpl value,
|
||||
$Res Function(_$FeedStateLoadedImpl) then) =
|
||||
__$$FeedStateLoadedImplCopyWithImpl<$Res>;
|
||||
factory _$$FeedStateLoadedImplCopyWith(
|
||||
_$FeedStateLoadedImpl value,
|
||||
$Res Function(_$FeedStateLoadedImpl) then,
|
||||
) = __$$FeedStateLoadedImplCopyWithImpl<$Res>;
|
||||
@useResult
|
||||
$Res call({List<FeedBlogPostModel> feedBlogPostList, bool isLoading});
|
||||
}
|
||||
@@ -348,37 +354,39 @@ class __$$FeedStateLoadedImplCopyWithImpl<$Res>
|
||||
extends _$FeedStateCopyWithImpl<$Res, _$FeedStateLoadedImpl>
|
||||
implements _$$FeedStateLoadedImplCopyWith<$Res> {
|
||||
__$$FeedStateLoadedImplCopyWithImpl(
|
||||
_$FeedStateLoadedImpl _value, $Res Function(_$FeedStateLoadedImpl) _then)
|
||||
: super(_value, _then);
|
||||
_$FeedStateLoadedImpl _value,
|
||||
$Res Function(_$FeedStateLoadedImpl) _then,
|
||||
) : super(_value, _then);
|
||||
|
||||
/// Create a copy of FeedState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? feedBlogPostList = null,
|
||||
Object? isLoading = null,
|
||||
}) {
|
||||
return _then(_$FeedStateLoadedImpl(
|
||||
feedBlogPostList: null == feedBlogPostList
|
||||
? _value._feedBlogPostList
|
||||
: feedBlogPostList // ignore: cast_nullable_to_non_nullable
|
||||
as List<FeedBlogPostModel>,
|
||||
isLoading: null == isLoading
|
||||
? _value.isLoading
|
||||
: isLoading // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
));
|
||||
$Res call({Object? feedBlogPostList = null, Object? isLoading = null}) {
|
||||
return _then(
|
||||
_$FeedStateLoadedImpl(
|
||||
feedBlogPostList:
|
||||
null == feedBlogPostList
|
||||
? _value._feedBlogPostList
|
||||
: feedBlogPostList // ignore: cast_nullable_to_non_nullable
|
||||
as List<FeedBlogPostModel>,
|
||||
isLoading:
|
||||
null == isLoading
|
||||
? _value.isLoading
|
||||
: isLoading // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
|
||||
class _$FeedStateLoadedImpl implements FeedStateLoaded {
|
||||
const _$FeedStateLoadedImpl(
|
||||
{required final List<FeedBlogPostModel> feedBlogPostList,
|
||||
required this.isLoading})
|
||||
: _feedBlogPostList = feedBlogPostList;
|
||||
const _$FeedStateLoadedImpl({
|
||||
required final List<FeedBlogPostModel> feedBlogPostList,
|
||||
required this.isLoading,
|
||||
}) : _feedBlogPostList = feedBlogPostList;
|
||||
|
||||
final List<FeedBlogPostModel> _feedBlogPostList;
|
||||
@override
|
||||
@@ -402,15 +410,20 @@ class _$FeedStateLoadedImpl implements FeedStateLoaded {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$FeedStateLoadedImpl &&
|
||||
const DeepCollectionEquality()
|
||||
.equals(other._feedBlogPostList, _feedBlogPostList) &&
|
||||
const DeepCollectionEquality().equals(
|
||||
other._feedBlogPostList,
|
||||
_feedBlogPostList,
|
||||
) &&
|
||||
(identical(other.isLoading, isLoading) ||
|
||||
other.isLoading == isLoading));
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType,
|
||||
const DeepCollectionEquality().hash(_feedBlogPostList), isLoading);
|
||||
int get hashCode => Object.hash(
|
||||
runtimeType,
|
||||
const DeepCollectionEquality().hash(_feedBlogPostList),
|
||||
isLoading,
|
||||
);
|
||||
|
||||
/// Create a copy of FeedState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -419,7 +432,9 @@ class _$FeedStateLoadedImpl implements FeedStateLoaded {
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$FeedStateLoadedImplCopyWith<_$FeedStateLoadedImpl> get copyWith =>
|
||||
__$$FeedStateLoadedImplCopyWithImpl<_$FeedStateLoadedImpl>(
|
||||
this, _$identity);
|
||||
this,
|
||||
_$identity,
|
||||
);
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
@@ -427,8 +442,10 @@ class _$FeedStateLoadedImpl implements FeedStateLoaded {
|
||||
TResult Function() $default, {
|
||||
required TResult Function() loading,
|
||||
required TResult Function(
|
||||
List<FeedBlogPostModel> feedBlogPostList, bool isLoading)
|
||||
loaded,
|
||||
List<FeedBlogPostModel> feedBlogPostList,
|
||||
bool isLoading,
|
||||
)
|
||||
loaded,
|
||||
required TResult Function(String errorMessage) error,
|
||||
}) {
|
||||
return loaded(feedBlogPostList, isLoading);
|
||||
@@ -440,7 +457,7 @@ class _$FeedStateLoadedImpl implements FeedStateLoaded {
|
||||
TResult? Function()? $default, {
|
||||
TResult? Function()? loading,
|
||||
TResult? Function(List<FeedBlogPostModel> feedBlogPostList, bool isLoading)?
|
||||
loaded,
|
||||
loaded,
|
||||
TResult? Function(String errorMessage)? error,
|
||||
}) {
|
||||
return loaded?.call(feedBlogPostList, isLoading);
|
||||
@@ -452,7 +469,7 @@ class _$FeedStateLoadedImpl implements FeedStateLoaded {
|
||||
TResult Function()? $default, {
|
||||
TResult Function()? loading,
|
||||
TResult Function(List<FeedBlogPostModel> feedBlogPostList, bool isLoading)?
|
||||
loaded,
|
||||
loaded,
|
||||
TResult Function(String errorMessage)? error,
|
||||
required TResult orElse(),
|
||||
}) {
|
||||
@@ -501,9 +518,10 @@ class _$FeedStateLoadedImpl implements FeedStateLoaded {
|
||||
}
|
||||
|
||||
abstract class FeedStateLoaded implements FeedState {
|
||||
const factory FeedStateLoaded(
|
||||
{required final List<FeedBlogPostModel> feedBlogPostList,
|
||||
required final bool isLoading}) = _$FeedStateLoadedImpl;
|
||||
const factory FeedStateLoaded({
|
||||
required final List<FeedBlogPostModel> feedBlogPostList,
|
||||
required final bool isLoading,
|
||||
}) = _$FeedStateLoadedImpl;
|
||||
|
||||
List<FeedBlogPostModel> get feedBlogPostList;
|
||||
bool get isLoading;
|
||||
@@ -517,9 +535,10 @@ abstract class FeedStateLoaded implements FeedState {
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$FeedStateErrorImplCopyWith<$Res> {
|
||||
factory _$$FeedStateErrorImplCopyWith(_$FeedStateErrorImpl value,
|
||||
$Res Function(_$FeedStateErrorImpl) then) =
|
||||
__$$FeedStateErrorImplCopyWithImpl<$Res>;
|
||||
factory _$$FeedStateErrorImplCopyWith(
|
||||
_$FeedStateErrorImpl value,
|
||||
$Res Function(_$FeedStateErrorImpl) then,
|
||||
) = __$$FeedStateErrorImplCopyWithImpl<$Res>;
|
||||
@useResult
|
||||
$Res call({String errorMessage});
|
||||
}
|
||||
@@ -529,22 +548,24 @@ class __$$FeedStateErrorImplCopyWithImpl<$Res>
|
||||
extends _$FeedStateCopyWithImpl<$Res, _$FeedStateErrorImpl>
|
||||
implements _$$FeedStateErrorImplCopyWith<$Res> {
|
||||
__$$FeedStateErrorImplCopyWithImpl(
|
||||
_$FeedStateErrorImpl _value, $Res Function(_$FeedStateErrorImpl) _then)
|
||||
: super(_value, _then);
|
||||
_$FeedStateErrorImpl _value,
|
||||
$Res Function(_$FeedStateErrorImpl) _then,
|
||||
) : super(_value, _then);
|
||||
|
||||
/// Create a copy of FeedState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? errorMessage = null,
|
||||
}) {
|
||||
return _then(_$FeedStateErrorImpl(
|
||||
errorMessage: null == errorMessage
|
||||
? _value.errorMessage
|
||||
: errorMessage // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
));
|
||||
$Res call({Object? errorMessage = null}) {
|
||||
return _then(
|
||||
_$FeedStateErrorImpl(
|
||||
errorMessage:
|
||||
null == errorMessage
|
||||
? _value.errorMessage
|
||||
: errorMessage // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -580,7 +601,9 @@ class _$FeedStateErrorImpl implements FeedStateError {
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$FeedStateErrorImplCopyWith<_$FeedStateErrorImpl> get copyWith =>
|
||||
__$$FeedStateErrorImplCopyWithImpl<_$FeedStateErrorImpl>(
|
||||
this, _$identity);
|
||||
this,
|
||||
_$identity,
|
||||
);
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
@@ -588,8 +611,10 @@ class _$FeedStateErrorImpl implements FeedStateError {
|
||||
TResult Function() $default, {
|
||||
required TResult Function() loading,
|
||||
required TResult Function(
|
||||
List<FeedBlogPostModel> feedBlogPostList, bool isLoading)
|
||||
loaded,
|
||||
List<FeedBlogPostModel> feedBlogPostList,
|
||||
bool isLoading,
|
||||
)
|
||||
loaded,
|
||||
required TResult Function(String errorMessage) error,
|
||||
}) {
|
||||
return error(errorMessage);
|
||||
@@ -601,7 +626,7 @@ class _$FeedStateErrorImpl implements FeedStateError {
|
||||
TResult? Function()? $default, {
|
||||
TResult? Function()? loading,
|
||||
TResult? Function(List<FeedBlogPostModel> feedBlogPostList, bool isLoading)?
|
||||
loaded,
|
||||
loaded,
|
||||
TResult? Function(String errorMessage)? error,
|
||||
}) {
|
||||
return error?.call(errorMessage);
|
||||
@@ -613,7 +638,7 @@ class _$FeedStateErrorImpl implements FeedStateError {
|
||||
TResult Function()? $default, {
|
||||
TResult Function()? loading,
|
||||
TResult Function(List<FeedBlogPostModel> feedBlogPostList, bool isLoading)?
|
||||
loaded,
|
||||
loaded,
|
||||
TResult Function(String errorMessage)? error,
|
||||
required TResult orElse(),
|
||||
}) {
|
||||
|
||||
@@ -12,7 +12,8 @@ part of 'plans_state.dart';
|
||||
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');
|
||||
'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',
|
||||
);
|
||||
|
||||
/// @nodoc
|
||||
mixin _$PlansState {
|
||||
@@ -33,16 +34,18 @@ mixin _$PlansState {
|
||||
/// @nodoc
|
||||
abstract class $PlansStateCopyWith<$Res> {
|
||||
factory $PlansStateCopyWith(
|
||||
PlansState value, $Res Function(PlansState) then) =
|
||||
_$PlansStateCopyWithImpl<$Res, PlansState>;
|
||||
PlansState value,
|
||||
$Res Function(PlansState) then,
|
||||
) = _$PlansStateCopyWithImpl<$Res, PlansState>;
|
||||
@useResult
|
||||
$Res call(
|
||||
{bool isLoading,
|
||||
List<PlanModel> plans,
|
||||
String? errorMessage,
|
||||
PlansFilterState filterState,
|
||||
int minPlanPrice,
|
||||
int maxPlanPrice});
|
||||
$Res call({
|
||||
bool isLoading,
|
||||
List<PlanModel> plans,
|
||||
String? errorMessage,
|
||||
PlansFilterState filterState,
|
||||
int minPlanPrice,
|
||||
int maxPlanPrice,
|
||||
});
|
||||
|
||||
$PlansFilterStateCopyWith<$Res> get filterState;
|
||||
}
|
||||
@@ -69,32 +72,41 @@ class _$PlansStateCopyWithImpl<$Res, $Val extends PlansState>
|
||||
Object? minPlanPrice = null,
|
||||
Object? maxPlanPrice = null,
|
||||
}) {
|
||||
return _then(_value.copyWith(
|
||||
isLoading: null == isLoading
|
||||
? _value.isLoading
|
||||
: isLoading // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
plans: null == plans
|
||||
? _value.plans
|
||||
: plans // ignore: cast_nullable_to_non_nullable
|
||||
as List<PlanModel>,
|
||||
errorMessage: freezed == errorMessage
|
||||
? _value.errorMessage
|
||||
: errorMessage // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
filterState: null == filterState
|
||||
? _value.filterState
|
||||
: filterState // ignore: cast_nullable_to_non_nullable
|
||||
as PlansFilterState,
|
||||
minPlanPrice: null == minPlanPrice
|
||||
? _value.minPlanPrice
|
||||
: minPlanPrice // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
maxPlanPrice: null == maxPlanPrice
|
||||
? _value.maxPlanPrice
|
||||
: maxPlanPrice // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
) as $Val);
|
||||
return _then(
|
||||
_value.copyWith(
|
||||
isLoading:
|
||||
null == isLoading
|
||||
? _value.isLoading
|
||||
: isLoading // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
plans:
|
||||
null == plans
|
||||
? _value.plans
|
||||
: plans // ignore: cast_nullable_to_non_nullable
|
||||
as List<PlanModel>,
|
||||
errorMessage:
|
||||
freezed == errorMessage
|
||||
? _value.errorMessage
|
||||
: errorMessage // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
filterState:
|
||||
null == filterState
|
||||
? _value.filterState
|
||||
: filterState // ignore: cast_nullable_to_non_nullable
|
||||
as PlansFilterState,
|
||||
minPlanPrice:
|
||||
null == minPlanPrice
|
||||
? _value.minPlanPrice
|
||||
: minPlanPrice // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
maxPlanPrice:
|
||||
null == maxPlanPrice
|
||||
? _value.maxPlanPrice
|
||||
: maxPlanPrice // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
)
|
||||
as $Val,
|
||||
);
|
||||
}
|
||||
|
||||
/// Create a copy of PlansState
|
||||
@@ -112,17 +124,19 @@ class _$PlansStateCopyWithImpl<$Res, $Val extends PlansState>
|
||||
abstract class _$$PlansStateImplCopyWith<$Res>
|
||||
implements $PlansStateCopyWith<$Res> {
|
||||
factory _$$PlansStateImplCopyWith(
|
||||
_$PlansStateImpl value, $Res Function(_$PlansStateImpl) then) =
|
||||
__$$PlansStateImplCopyWithImpl<$Res>;
|
||||
_$PlansStateImpl value,
|
||||
$Res Function(_$PlansStateImpl) then,
|
||||
) = __$$PlansStateImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call(
|
||||
{bool isLoading,
|
||||
List<PlanModel> plans,
|
||||
String? errorMessage,
|
||||
PlansFilterState filterState,
|
||||
int minPlanPrice,
|
||||
int maxPlanPrice});
|
||||
$Res call({
|
||||
bool isLoading,
|
||||
List<PlanModel> plans,
|
||||
String? errorMessage,
|
||||
PlansFilterState filterState,
|
||||
int minPlanPrice,
|
||||
int maxPlanPrice,
|
||||
});
|
||||
|
||||
@override
|
||||
$PlansFilterStateCopyWith<$Res> get filterState;
|
||||
@@ -133,8 +147,9 @@ class __$$PlansStateImplCopyWithImpl<$Res>
|
||||
extends _$PlansStateCopyWithImpl<$Res, _$PlansStateImpl>
|
||||
implements _$$PlansStateImplCopyWith<$Res> {
|
||||
__$$PlansStateImplCopyWithImpl(
|
||||
_$PlansStateImpl _value, $Res Function(_$PlansStateImpl) _then)
|
||||
: super(_value, _then);
|
||||
_$PlansStateImpl _value,
|
||||
$Res Function(_$PlansStateImpl) _then,
|
||||
) : super(_value, _then);
|
||||
|
||||
/// Create a copy of PlansState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -148,46 +163,54 @@ class __$$PlansStateImplCopyWithImpl<$Res>
|
||||
Object? minPlanPrice = null,
|
||||
Object? maxPlanPrice = null,
|
||||
}) {
|
||||
return _then(_$PlansStateImpl(
|
||||
isLoading: null == isLoading
|
||||
? _value.isLoading
|
||||
: isLoading // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
plans: null == plans
|
||||
? _value._plans
|
||||
: plans // ignore: cast_nullable_to_non_nullable
|
||||
as List<PlanModel>,
|
||||
errorMessage: freezed == errorMessage
|
||||
? _value.errorMessage
|
||||
: errorMessage // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
filterState: null == filterState
|
||||
? _value.filterState
|
||||
: filterState // ignore: cast_nullable_to_non_nullable
|
||||
as PlansFilterState,
|
||||
minPlanPrice: null == minPlanPrice
|
||||
? _value.minPlanPrice
|
||||
: minPlanPrice // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
maxPlanPrice: null == maxPlanPrice
|
||||
? _value.maxPlanPrice
|
||||
: maxPlanPrice // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
));
|
||||
return _then(
|
||||
_$PlansStateImpl(
|
||||
isLoading:
|
||||
null == isLoading
|
||||
? _value.isLoading
|
||||
: isLoading // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
plans:
|
||||
null == plans
|
||||
? _value._plans
|
||||
: plans // ignore: cast_nullable_to_non_nullable
|
||||
as List<PlanModel>,
|
||||
errorMessage:
|
||||
freezed == errorMessage
|
||||
? _value.errorMessage
|
||||
: errorMessage // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
filterState:
|
||||
null == filterState
|
||||
? _value.filterState
|
||||
: filterState // ignore: cast_nullable_to_non_nullable
|
||||
as PlansFilterState,
|
||||
minPlanPrice:
|
||||
null == minPlanPrice
|
||||
? _value.minPlanPrice
|
||||
: minPlanPrice // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
maxPlanPrice:
|
||||
null == maxPlanPrice
|
||||
? _value.maxPlanPrice
|
||||
: maxPlanPrice // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
|
||||
class _$PlansStateImpl implements _PlansState {
|
||||
const _$PlansStateImpl(
|
||||
{required this.isLoading,
|
||||
required final List<PlanModel> plans,
|
||||
required this.errorMessage,
|
||||
required this.filterState,
|
||||
this.minPlanPrice = 0,
|
||||
this.maxPlanPrice = 0})
|
||||
: _plans = plans;
|
||||
const _$PlansStateImpl({
|
||||
required this.isLoading,
|
||||
required final List<PlanModel> plans,
|
||||
required this.errorMessage,
|
||||
required this.filterState,
|
||||
this.minPlanPrice = 0,
|
||||
this.maxPlanPrice = 0,
|
||||
}) : _plans = plans;
|
||||
|
||||
@override
|
||||
final bool isLoading;
|
||||
@@ -235,13 +258,14 @@ class _$PlansStateImpl implements _PlansState {
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hash(
|
||||
runtimeType,
|
||||
isLoading,
|
||||
const DeepCollectionEquality().hash(_plans),
|
||||
errorMessage,
|
||||
filterState,
|
||||
minPlanPrice,
|
||||
maxPlanPrice);
|
||||
runtimeType,
|
||||
isLoading,
|
||||
const DeepCollectionEquality().hash(_plans),
|
||||
errorMessage,
|
||||
filterState,
|
||||
minPlanPrice,
|
||||
maxPlanPrice,
|
||||
);
|
||||
|
||||
/// Create a copy of PlansState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -253,13 +277,14 @@ class _$PlansStateImpl implements _PlansState {
|
||||
}
|
||||
|
||||
abstract class _PlansState implements PlansState {
|
||||
const factory _PlansState(
|
||||
{required final bool isLoading,
|
||||
required final List<PlanModel> plans,
|
||||
required final String? errorMessage,
|
||||
required final PlansFilterState filterState,
|
||||
final int minPlanPrice,
|
||||
final int maxPlanPrice}) = _$PlansStateImpl;
|
||||
const factory _PlansState({
|
||||
required final bool isLoading,
|
||||
required final List<PlanModel> plans,
|
||||
required final String? errorMessage,
|
||||
required final PlansFilterState filterState,
|
||||
final int minPlanPrice,
|
||||
final int maxPlanPrice,
|
||||
}) = _$PlansStateImpl;
|
||||
|
||||
@override
|
||||
bool get isLoading;
|
||||
@@ -298,8 +323,9 @@ mixin _$PlansFilterState {
|
||||
/// @nodoc
|
||||
abstract class $PlansFilterStateCopyWith<$Res> {
|
||||
factory $PlansFilterStateCopyWith(
|
||||
PlansFilterState value, $Res Function(PlansFilterState) then) =
|
||||
_$PlansFilterStateCopyWithImpl<$Res, PlansFilterState>;
|
||||
PlansFilterState value,
|
||||
$Res Function(PlansFilterState) then,
|
||||
) = _$PlansFilterStateCopyWithImpl<$Res, PlansFilterState>;
|
||||
@useResult
|
||||
$Res call({(int?, int?) priceFilter, int durationIndex, int typeIndex});
|
||||
}
|
||||
@@ -323,29 +349,36 @@ class _$PlansFilterStateCopyWithImpl<$Res, $Val extends PlansFilterState>
|
||||
Object? durationIndex = null,
|
||||
Object? typeIndex = null,
|
||||
}) {
|
||||
return _then(_value.copyWith(
|
||||
priceFilter: null == priceFilter
|
||||
? _value.priceFilter
|
||||
: priceFilter // ignore: cast_nullable_to_non_nullable
|
||||
as (int?, int?),
|
||||
durationIndex: null == durationIndex
|
||||
? _value.durationIndex
|
||||
: durationIndex // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
typeIndex: null == typeIndex
|
||||
? _value.typeIndex
|
||||
: typeIndex // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
) as $Val);
|
||||
return _then(
|
||||
_value.copyWith(
|
||||
priceFilter:
|
||||
null == priceFilter
|
||||
? _value.priceFilter
|
||||
: priceFilter // ignore: cast_nullable_to_non_nullable
|
||||
as (int?, int?),
|
||||
durationIndex:
|
||||
null == durationIndex
|
||||
? _value.durationIndex
|
||||
: durationIndex // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
typeIndex:
|
||||
null == typeIndex
|
||||
? _value.typeIndex
|
||||
: typeIndex // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
)
|
||||
as $Val,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$PlansFilterStateImplCopyWith<$Res>
|
||||
implements $PlansFilterStateCopyWith<$Res> {
|
||||
factory _$$PlansFilterStateImplCopyWith(_$PlansFilterStateImpl value,
|
||||
$Res Function(_$PlansFilterStateImpl) then) =
|
||||
__$$PlansFilterStateImplCopyWithImpl<$Res>;
|
||||
factory _$$PlansFilterStateImplCopyWith(
|
||||
_$PlansFilterStateImpl value,
|
||||
$Res Function(_$PlansFilterStateImpl) then,
|
||||
) = __$$PlansFilterStateImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call({(int?, int?) priceFilter, int durationIndex, int typeIndex});
|
||||
@@ -355,9 +388,10 @@ abstract class _$$PlansFilterStateImplCopyWith<$Res>
|
||||
class __$$PlansFilterStateImplCopyWithImpl<$Res>
|
||||
extends _$PlansFilterStateCopyWithImpl<$Res, _$PlansFilterStateImpl>
|
||||
implements _$$PlansFilterStateImplCopyWith<$Res> {
|
||||
__$$PlansFilterStateImplCopyWithImpl(_$PlansFilterStateImpl _value,
|
||||
$Res Function(_$PlansFilterStateImpl) _then)
|
||||
: super(_value, _then);
|
||||
__$$PlansFilterStateImplCopyWithImpl(
|
||||
_$PlansFilterStateImpl _value,
|
||||
$Res Function(_$PlansFilterStateImpl) _then,
|
||||
) : super(_value, _then);
|
||||
|
||||
/// Create a copy of PlansFilterState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -368,30 +402,36 @@ class __$$PlansFilterStateImplCopyWithImpl<$Res>
|
||||
Object? durationIndex = null,
|
||||
Object? typeIndex = null,
|
||||
}) {
|
||||
return _then(_$PlansFilterStateImpl(
|
||||
priceFilter: null == priceFilter
|
||||
? _value.priceFilter
|
||||
: priceFilter // ignore: cast_nullable_to_non_nullable
|
||||
as (int?, int?),
|
||||
durationIndex: null == durationIndex
|
||||
? _value.durationIndex
|
||||
: durationIndex // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
typeIndex: null == typeIndex
|
||||
? _value.typeIndex
|
||||
: typeIndex // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
));
|
||||
return _then(
|
||||
_$PlansFilterStateImpl(
|
||||
priceFilter:
|
||||
null == priceFilter
|
||||
? _value.priceFilter
|
||||
: priceFilter // ignore: cast_nullable_to_non_nullable
|
||||
as (int?, int?),
|
||||
durationIndex:
|
||||
null == durationIndex
|
||||
? _value.durationIndex
|
||||
: durationIndex // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
typeIndex:
|
||||
null == typeIndex
|
||||
? _value.typeIndex
|
||||
: typeIndex // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
|
||||
class _$PlansFilterStateImpl implements _PlansFilterState {
|
||||
const _$PlansFilterStateImpl(
|
||||
{required this.priceFilter,
|
||||
required this.durationIndex,
|
||||
required this.typeIndex});
|
||||
const _$PlansFilterStateImpl({
|
||||
required this.priceFilter,
|
||||
required this.durationIndex,
|
||||
required this.typeIndex,
|
||||
});
|
||||
|
||||
@override
|
||||
final (int?, int?) priceFilter;
|
||||
@@ -429,14 +469,17 @@ class _$PlansFilterStateImpl implements _PlansFilterState {
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$PlansFilterStateImplCopyWith<_$PlansFilterStateImpl> get copyWith =>
|
||||
__$$PlansFilterStateImplCopyWithImpl<_$PlansFilterStateImpl>(
|
||||
this, _$identity);
|
||||
this,
|
||||
_$identity,
|
||||
);
|
||||
}
|
||||
|
||||
abstract class _PlansFilterState implements PlansFilterState {
|
||||
const factory _PlansFilterState(
|
||||
{required final (int?, int?) priceFilter,
|
||||
required final int durationIndex,
|
||||
required final int typeIndex}) = _$PlansFilterStateImpl;
|
||||
const factory _PlansFilterState({
|
||||
required final (int?, int?) priceFilter,
|
||||
required final int durationIndex,
|
||||
required final int typeIndex,
|
||||
}) = _$PlansFilterStateImpl;
|
||||
|
||||
@override
|
||||
(int?, int?) get priceFilter;
|
||||
|
||||
@@ -12,7 +12,8 @@ part of 'profile_state.dart';
|
||||
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');
|
||||
'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',
|
||||
);
|
||||
|
||||
/// @nodoc
|
||||
mixin _$ProfileState {
|
||||
@@ -28,8 +29,9 @@ mixin _$ProfileState {
|
||||
/// @nodoc
|
||||
abstract class $ProfileStateCopyWith<$Res> {
|
||||
factory $ProfileStateCopyWith(
|
||||
ProfileState value, $Res Function(ProfileState) then) =
|
||||
_$ProfileStateCopyWithImpl<$Res, ProfileState>;
|
||||
ProfileState value,
|
||||
$Res Function(ProfileState) then,
|
||||
) = _$ProfileStateCopyWithImpl<$Res, ProfileState>;
|
||||
@useResult
|
||||
$Res call({ProfileModel? profile});
|
||||
|
||||
@@ -50,15 +52,17 @@ class _$ProfileStateCopyWithImpl<$Res, $Val extends ProfileState>
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? profile = freezed,
|
||||
}) {
|
||||
return _then(_value.copyWith(
|
||||
profile: freezed == profile
|
||||
? _value.profile
|
||||
: profile // ignore: cast_nullable_to_non_nullable
|
||||
as ProfileModel?,
|
||||
) as $Val);
|
||||
$Res call({Object? profile = freezed}) {
|
||||
return _then(
|
||||
_value.copyWith(
|
||||
profile:
|
||||
freezed == profile
|
||||
? _value.profile
|
||||
: profile // ignore: cast_nullable_to_non_nullable
|
||||
as ProfileModel?,
|
||||
)
|
||||
as $Val,
|
||||
);
|
||||
}
|
||||
|
||||
/// Create a copy of ProfileState
|
||||
@@ -80,8 +84,9 @@ class _$ProfileStateCopyWithImpl<$Res, $Val extends ProfileState>
|
||||
abstract class _$$ProfileStateImplCopyWith<$Res>
|
||||
implements $ProfileStateCopyWith<$Res> {
|
||||
factory _$$ProfileStateImplCopyWith(
|
||||
_$ProfileStateImpl value, $Res Function(_$ProfileStateImpl) then) =
|
||||
__$$ProfileStateImplCopyWithImpl<$Res>;
|
||||
_$ProfileStateImpl value,
|
||||
$Res Function(_$ProfileStateImpl) then,
|
||||
) = __$$ProfileStateImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call({ProfileModel? profile});
|
||||
@@ -95,22 +100,24 @@ class __$$ProfileStateImplCopyWithImpl<$Res>
|
||||
extends _$ProfileStateCopyWithImpl<$Res, _$ProfileStateImpl>
|
||||
implements _$$ProfileStateImplCopyWith<$Res> {
|
||||
__$$ProfileStateImplCopyWithImpl(
|
||||
_$ProfileStateImpl _value, $Res Function(_$ProfileStateImpl) _then)
|
||||
: super(_value, _then);
|
||||
_$ProfileStateImpl _value,
|
||||
$Res Function(_$ProfileStateImpl) _then,
|
||||
) : super(_value, _then);
|
||||
|
||||
/// Create a copy of ProfileState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? profile = freezed,
|
||||
}) {
|
||||
return _then(_$ProfileStateImpl(
|
||||
profile: freezed == profile
|
||||
? _value.profile
|
||||
: profile // ignore: cast_nullable_to_non_nullable
|
||||
as ProfileModel?,
|
||||
));
|
||||
$Res call({Object? profile = freezed}) {
|
||||
return _then(
|
||||
_$ProfileStateImpl(
|
||||
profile:
|
||||
freezed == profile
|
||||
? _value.profile
|
||||
: profile // ignore: cast_nullable_to_non_nullable
|
||||
as ProfileModel?,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -12,7 +12,8 @@ part of 'recipes_state.dart';
|
||||
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');
|
||||
'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',
|
||||
);
|
||||
|
||||
/// @nodoc
|
||||
mixin _$RecipesState {
|
||||
@@ -33,16 +34,18 @@ mixin _$RecipesState {
|
||||
/// @nodoc
|
||||
abstract class $RecipesStateCopyWith<$Res> {
|
||||
factory $RecipesStateCopyWith(
|
||||
RecipesState value, $Res Function(RecipesState) then) =
|
||||
_$RecipesStateCopyWithImpl<$Res, RecipesState>;
|
||||
RecipesState value,
|
||||
$Res Function(RecipesState) then,
|
||||
) = _$RecipesStateCopyWithImpl<$Res, RecipesState>;
|
||||
@useResult
|
||||
$Res call(
|
||||
{List<Recipe> recipesList,
|
||||
List<RecipeTag> recipesTags,
|
||||
Set<int> selectedTags,
|
||||
int selectedTagsCounter,
|
||||
bool isLoading,
|
||||
String? errorMessage});
|
||||
$Res call({
|
||||
List<Recipe> recipesList,
|
||||
List<RecipeTag> recipesTags,
|
||||
Set<int> selectedTags,
|
||||
int selectedTagsCounter,
|
||||
bool isLoading,
|
||||
String? errorMessage,
|
||||
});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@@ -67,32 +70,41 @@ class _$RecipesStateCopyWithImpl<$Res, $Val extends RecipesState>
|
||||
Object? isLoading = null,
|
||||
Object? errorMessage = freezed,
|
||||
}) {
|
||||
return _then(_value.copyWith(
|
||||
recipesList: null == recipesList
|
||||
? _value.recipesList
|
||||
: recipesList // ignore: cast_nullable_to_non_nullable
|
||||
as List<Recipe>,
|
||||
recipesTags: null == recipesTags
|
||||
? _value.recipesTags
|
||||
: recipesTags // ignore: cast_nullable_to_non_nullable
|
||||
as List<RecipeTag>,
|
||||
selectedTags: null == selectedTags
|
||||
? _value.selectedTags
|
||||
: selectedTags // ignore: cast_nullable_to_non_nullable
|
||||
as Set<int>,
|
||||
selectedTagsCounter: null == selectedTagsCounter
|
||||
? _value.selectedTagsCounter
|
||||
: selectedTagsCounter // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
isLoading: null == isLoading
|
||||
? _value.isLoading
|
||||
: isLoading // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
errorMessage: freezed == errorMessage
|
||||
? _value.errorMessage
|
||||
: errorMessage // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
) as $Val);
|
||||
return _then(
|
||||
_value.copyWith(
|
||||
recipesList:
|
||||
null == recipesList
|
||||
? _value.recipesList
|
||||
: recipesList // ignore: cast_nullable_to_non_nullable
|
||||
as List<Recipe>,
|
||||
recipesTags:
|
||||
null == recipesTags
|
||||
? _value.recipesTags
|
||||
: recipesTags // ignore: cast_nullable_to_non_nullable
|
||||
as List<RecipeTag>,
|
||||
selectedTags:
|
||||
null == selectedTags
|
||||
? _value.selectedTags
|
||||
: selectedTags // ignore: cast_nullable_to_non_nullable
|
||||
as Set<int>,
|
||||
selectedTagsCounter:
|
||||
null == selectedTagsCounter
|
||||
? _value.selectedTagsCounter
|
||||
: selectedTagsCounter // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
isLoading:
|
||||
null == isLoading
|
||||
? _value.isLoading
|
||||
: isLoading // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
errorMessage:
|
||||
freezed == errorMessage
|
||||
? _value.errorMessage
|
||||
: errorMessage // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
)
|
||||
as $Val,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -100,17 +112,19 @@ class _$RecipesStateCopyWithImpl<$Res, $Val extends RecipesState>
|
||||
abstract class _$$RecipesStateImplCopyWith<$Res>
|
||||
implements $RecipesStateCopyWith<$Res> {
|
||||
factory _$$RecipesStateImplCopyWith(
|
||||
_$RecipesStateImpl value, $Res Function(_$RecipesStateImpl) then) =
|
||||
__$$RecipesStateImplCopyWithImpl<$Res>;
|
||||
_$RecipesStateImpl value,
|
||||
$Res Function(_$RecipesStateImpl) then,
|
||||
) = __$$RecipesStateImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call(
|
||||
{List<Recipe> recipesList,
|
||||
List<RecipeTag> recipesTags,
|
||||
Set<int> selectedTags,
|
||||
int selectedTagsCounter,
|
||||
bool isLoading,
|
||||
String? errorMessage});
|
||||
$Res call({
|
||||
List<Recipe> recipesList,
|
||||
List<RecipeTag> recipesTags,
|
||||
Set<int> selectedTags,
|
||||
int selectedTagsCounter,
|
||||
bool isLoading,
|
||||
String? errorMessage,
|
||||
});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@@ -118,8 +132,9 @@ class __$$RecipesStateImplCopyWithImpl<$Res>
|
||||
extends _$RecipesStateCopyWithImpl<$Res, _$RecipesStateImpl>
|
||||
implements _$$RecipesStateImplCopyWith<$Res> {
|
||||
__$$RecipesStateImplCopyWithImpl(
|
||||
_$RecipesStateImpl _value, $Res Function(_$RecipesStateImpl) _then)
|
||||
: super(_value, _then);
|
||||
_$RecipesStateImpl _value,
|
||||
$Res Function(_$RecipesStateImpl) _then,
|
||||
) : super(_value, _then);
|
||||
|
||||
/// Create a copy of RecipesState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -133,48 +148,56 @@ class __$$RecipesStateImplCopyWithImpl<$Res>
|
||||
Object? isLoading = null,
|
||||
Object? errorMessage = freezed,
|
||||
}) {
|
||||
return _then(_$RecipesStateImpl(
|
||||
recipesList: null == recipesList
|
||||
? _value._recipesList
|
||||
: recipesList // ignore: cast_nullable_to_non_nullable
|
||||
as List<Recipe>,
|
||||
recipesTags: null == recipesTags
|
||||
? _value._recipesTags
|
||||
: recipesTags // ignore: cast_nullable_to_non_nullable
|
||||
as List<RecipeTag>,
|
||||
selectedTags: null == selectedTags
|
||||
? _value._selectedTags
|
||||
: selectedTags // ignore: cast_nullable_to_non_nullable
|
||||
as Set<int>,
|
||||
selectedTagsCounter: null == selectedTagsCounter
|
||||
? _value.selectedTagsCounter
|
||||
: selectedTagsCounter // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
isLoading: null == isLoading
|
||||
? _value.isLoading
|
||||
: isLoading // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
errorMessage: freezed == errorMessage
|
||||
? _value.errorMessage
|
||||
: errorMessage // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
));
|
||||
return _then(
|
||||
_$RecipesStateImpl(
|
||||
recipesList:
|
||||
null == recipesList
|
||||
? _value._recipesList
|
||||
: recipesList // ignore: cast_nullable_to_non_nullable
|
||||
as List<Recipe>,
|
||||
recipesTags:
|
||||
null == recipesTags
|
||||
? _value._recipesTags
|
||||
: recipesTags // ignore: cast_nullable_to_non_nullable
|
||||
as List<RecipeTag>,
|
||||
selectedTags:
|
||||
null == selectedTags
|
||||
? _value._selectedTags
|
||||
: selectedTags // ignore: cast_nullable_to_non_nullable
|
||||
as Set<int>,
|
||||
selectedTagsCounter:
|
||||
null == selectedTagsCounter
|
||||
? _value.selectedTagsCounter
|
||||
: selectedTagsCounter // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
isLoading:
|
||||
null == isLoading
|
||||
? _value.isLoading
|
||||
: isLoading // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
errorMessage:
|
||||
freezed == errorMessage
|
||||
? _value.errorMessage
|
||||
: errorMessage // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
|
||||
class _$RecipesStateImpl implements _RecipesState {
|
||||
const _$RecipesStateImpl(
|
||||
{required final List<Recipe> recipesList,
|
||||
required final List<RecipeTag> recipesTags,
|
||||
required final Set<int> selectedTags,
|
||||
required this.selectedTagsCounter,
|
||||
required this.isLoading,
|
||||
this.errorMessage})
|
||||
: _recipesList = recipesList,
|
||||
_recipesTags = recipesTags,
|
||||
_selectedTags = selectedTags;
|
||||
const _$RecipesStateImpl({
|
||||
required final List<Recipe> recipesList,
|
||||
required final List<RecipeTag> recipesTags,
|
||||
required final Set<int> selectedTags,
|
||||
required this.selectedTagsCounter,
|
||||
required this.isLoading,
|
||||
this.errorMessage,
|
||||
}) : _recipesList = recipesList,
|
||||
_recipesTags = recipesTags,
|
||||
_selectedTags = selectedTags;
|
||||
|
||||
final List<Recipe> _recipesList;
|
||||
@override
|
||||
@@ -217,12 +240,18 @@ class _$RecipesStateImpl implements _RecipesState {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$RecipesStateImpl &&
|
||||
const DeepCollectionEquality()
|
||||
.equals(other._recipesList, _recipesList) &&
|
||||
const DeepCollectionEquality()
|
||||
.equals(other._recipesTags, _recipesTags) &&
|
||||
const DeepCollectionEquality()
|
||||
.equals(other._selectedTags, _selectedTags) &&
|
||||
const DeepCollectionEquality().equals(
|
||||
other._recipesList,
|
||||
_recipesList,
|
||||
) &&
|
||||
const DeepCollectionEquality().equals(
|
||||
other._recipesTags,
|
||||
_recipesTags,
|
||||
) &&
|
||||
const DeepCollectionEquality().equals(
|
||||
other._selectedTags,
|
||||
_selectedTags,
|
||||
) &&
|
||||
(identical(other.selectedTagsCounter, selectedTagsCounter) ||
|
||||
other.selectedTagsCounter == selectedTagsCounter) &&
|
||||
(identical(other.isLoading, isLoading) ||
|
||||
@@ -233,13 +262,14 @@ class _$RecipesStateImpl implements _RecipesState {
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hash(
|
||||
runtimeType,
|
||||
const DeepCollectionEquality().hash(_recipesList),
|
||||
const DeepCollectionEquality().hash(_recipesTags),
|
||||
const DeepCollectionEquality().hash(_selectedTags),
|
||||
selectedTagsCounter,
|
||||
isLoading,
|
||||
errorMessage);
|
||||
runtimeType,
|
||||
const DeepCollectionEquality().hash(_recipesList),
|
||||
const DeepCollectionEquality().hash(_recipesTags),
|
||||
const DeepCollectionEquality().hash(_selectedTags),
|
||||
selectedTagsCounter,
|
||||
isLoading,
|
||||
errorMessage,
|
||||
);
|
||||
|
||||
/// Create a copy of RecipesState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -251,13 +281,14 @@ class _$RecipesStateImpl implements _RecipesState {
|
||||
}
|
||||
|
||||
abstract class _RecipesState implements RecipesState {
|
||||
const factory _RecipesState(
|
||||
{required final List<Recipe> recipesList,
|
||||
required final List<RecipeTag> recipesTags,
|
||||
required final Set<int> selectedTags,
|
||||
required final int selectedTagsCounter,
|
||||
required final bool isLoading,
|
||||
final String? errorMessage}) = _$RecipesStateImpl;
|
||||
const factory _RecipesState({
|
||||
required final List<Recipe> recipesList,
|
||||
required final List<RecipeTag> recipesTags,
|
||||
required final Set<int> selectedTags,
|
||||
required final int selectedTagsCounter,
|
||||
required final bool isLoading,
|
||||
final String? errorMessage,
|
||||
}) = _$RecipesStateImpl;
|
||||
|
||||
@override
|
||||
List<Recipe> get recipesList;
|
||||
|
||||
Reference in New Issue
Block a user