forked from eatvio/eatvio_app
feat(profile): add profile charts models, requests. Max length of description in posts, recipes, diets = 200
This commit is contained in:
@@ -22,10 +22,8 @@ CommentModel _$CommentModelFromJson(Map<String, dynamic> json) {
|
||||
mixin _$CommentModel {
|
||||
@JsonKey(name: "data")
|
||||
List<Comment> get data => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "links")
|
||||
Links get links => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "meta")
|
||||
Meta get meta => throw _privateConstructorUsedError;
|
||||
|
||||
@@ -35,28 +33,32 @@ mixin _$CommentModel {
|
||||
/// Create a copy of CommentModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$CommentModelCopyWith<CommentModel> get copyWith => throw _privateConstructorUsedError;
|
||||
$CommentModelCopyWith<CommentModel> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $CommentModelCopyWith<$Res> {
|
||||
factory $CommentModelCopyWith(CommentModel value, $Res Function(CommentModel) then) = _$CommentModelCopyWithImpl<$Res, CommentModel>;
|
||||
|
||||
factory $CommentModelCopyWith(
|
||||
CommentModel value, $Res Function(CommentModel) then) =
|
||||
_$CommentModelCopyWithImpl<$Res, CommentModel>;
|
||||
@useResult
|
||||
$Res call({@JsonKey(name: "data") List<Comment> data, @JsonKey(name: "links") Links links, @JsonKey(name: "meta") Meta meta});
|
||||
$Res call(
|
||||
{@JsonKey(name: "data") List<Comment> data,
|
||||
@JsonKey(name: "links") Links links,
|
||||
@JsonKey(name: "meta") Meta meta});
|
||||
|
||||
$LinksCopyWith<$Res> get links;
|
||||
|
||||
$MetaCopyWith<$Res> get meta;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$CommentModelCopyWithImpl<$Res, $Val extends CommentModel> implements $CommentModelCopyWith<$Res> {
|
||||
class _$CommentModelCopyWithImpl<$Res, $Val extends CommentModel>
|
||||
implements $CommentModelCopyWith<$Res> {
|
||||
_$CommentModelCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
@@ -107,23 +109,31 @@ class _$CommentModelCopyWithImpl<$Res, $Val extends CommentModel> implements $Co
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$CommentModelImplCopyWith<$Res> implements $CommentModelCopyWith<$Res> {
|
||||
factory _$$CommentModelImplCopyWith(_$CommentModelImpl value, $Res Function(_$CommentModelImpl) then) = __$$CommentModelImplCopyWithImpl<$Res>;
|
||||
|
||||
abstract class _$$CommentModelImplCopyWith<$Res>
|
||||
implements $CommentModelCopyWith<$Res> {
|
||||
factory _$$CommentModelImplCopyWith(
|
||||
_$CommentModelImpl value, $Res Function(_$CommentModelImpl) then) =
|
||||
__$$CommentModelImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call({@JsonKey(name: "data") List<Comment> data, @JsonKey(name: "links") Links links, @JsonKey(name: "meta") Meta meta});
|
||||
$Res call(
|
||||
{@JsonKey(name: "data") List<Comment> data,
|
||||
@JsonKey(name: "links") Links links,
|
||||
@JsonKey(name: "meta") Meta meta});
|
||||
|
||||
@override
|
||||
$LinksCopyWith<$Res> get links;
|
||||
|
||||
@override
|
||||
$MetaCopyWith<$Res> get meta;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$CommentModelImplCopyWithImpl<$Res> extends _$CommentModelCopyWithImpl<$Res, _$CommentModelImpl> implements _$$CommentModelImplCopyWith<$Res> {
|
||||
__$$CommentModelImplCopyWithImpl(_$CommentModelImpl _value, $Res Function(_$CommentModelImpl) _then) : super(_value, _then);
|
||||
class __$$CommentModelImplCopyWithImpl<$Res>
|
||||
extends _$CommentModelCopyWithImpl<$Res, _$CommentModelImpl>
|
||||
implements _$$CommentModelImplCopyWith<$Res> {
|
||||
__$$CommentModelImplCopyWithImpl(
|
||||
_$CommentModelImpl _value, $Res Function(_$CommentModelImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of CommentModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -155,13 +165,15 @@ class __$$CommentModelImplCopyWithImpl<$Res> extends _$CommentModelCopyWithImpl<
|
||||
@JsonSerializable()
|
||||
class _$CommentModelImpl implements _CommentModel {
|
||||
const _$CommentModelImpl(
|
||||
{@JsonKey(name: "data") required final List<Comment> data, @JsonKey(name: "links") required this.links, @JsonKey(name: "meta") required this.meta})
|
||||
{@JsonKey(name: "data") required final List<Comment> data,
|
||||
@JsonKey(name: "links") required this.links,
|
||||
@JsonKey(name: "meta") required this.meta})
|
||||
: _data = data;
|
||||
|
||||
factory _$CommentModelImpl.fromJson(Map<String, dynamic> json) => _$$CommentModelImplFromJson(json);
|
||||
factory _$CommentModelImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$CommentModelImplFromJson(json);
|
||||
|
||||
final List<Comment> _data;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "data")
|
||||
List<Comment> get data {
|
||||
@@ -194,14 +206,16 @@ class _$CommentModelImpl implements _CommentModel {
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType, const DeepCollectionEquality().hash(_data), links, meta);
|
||||
int get hashCode => Object.hash(
|
||||
runtimeType, const DeepCollectionEquality().hash(_data), links, meta);
|
||||
|
||||
/// Create a copy of CommentModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$CommentModelImplCopyWith<_$CommentModelImpl> get copyWith => __$$CommentModelImplCopyWithImpl<_$CommentModelImpl>(this, _$identity);
|
||||
_$$CommentModelImplCopyWith<_$CommentModelImpl> get copyWith =>
|
||||
__$$CommentModelImplCopyWithImpl<_$CommentModelImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
@@ -217,16 +231,15 @@ abstract class _CommentModel implements CommentModel {
|
||||
@JsonKey(name: "links") required final Links links,
|
||||
@JsonKey(name: "meta") required final Meta meta}) = _$CommentModelImpl;
|
||||
|
||||
factory _CommentModel.fromJson(Map<String, dynamic> json) = _$CommentModelImpl.fromJson;
|
||||
factory _CommentModel.fromJson(Map<String, dynamic> json) =
|
||||
_$CommentModelImpl.fromJson;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "data")
|
||||
List<Comment> get data;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "links")
|
||||
Links get links;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "meta")
|
||||
Meta get meta;
|
||||
@@ -235,7 +248,8 @@ abstract class _CommentModel implements CommentModel {
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$CommentModelImplCopyWith<_$CommentModelImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
_$$CommentModelImplCopyWith<_$CommentModelImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
Comment _$CommentFromJson(Map<String, dynamic> json) {
|
||||
@@ -246,19 +260,14 @@ Comment _$CommentFromJson(Map<String, dynamic> json) {
|
||||
mixin _$Comment {
|
||||
@JsonKey(name: "id")
|
||||
int get id => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "author_name")
|
||||
String get authorName => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "author_profile_icon")
|
||||
String get authorProfileIcon => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "body")
|
||||
String get body => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "children_comments")
|
||||
List<Comment> get childrenComments => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "created_at")
|
||||
DateTime get createdAt => throw _privateConstructorUsedError;
|
||||
|
||||
@@ -273,8 +282,8 @@ mixin _$Comment {
|
||||
|
||||
/// @nodoc
|
||||
abstract class $CommentCopyWith<$Res> {
|
||||
factory $CommentCopyWith(Comment value, $Res Function(Comment) then) = _$CommentCopyWithImpl<$Res, Comment>;
|
||||
|
||||
factory $CommentCopyWith(Comment value, $Res Function(Comment) then) =
|
||||
_$CommentCopyWithImpl<$Res, Comment>;
|
||||
@useResult
|
||||
$Res call(
|
||||
{@JsonKey(name: "id") int id,
|
||||
@@ -286,12 +295,12 @@ abstract class $CommentCopyWith<$Res> {
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$CommentCopyWithImpl<$Res, $Val extends Comment> implements $CommentCopyWith<$Res> {
|
||||
class _$CommentCopyWithImpl<$Res, $Val extends Comment>
|
||||
implements $CommentCopyWith<$Res> {
|
||||
_$CommentCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
@@ -338,8 +347,9 @@ class _$CommentCopyWithImpl<$Res, $Val extends Comment> implements $CommentCopyW
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$CommentImplCopyWith<$Res> implements $CommentCopyWith<$Res> {
|
||||
factory _$$CommentImplCopyWith(_$CommentImpl value, $Res Function(_$CommentImpl) then) = __$$CommentImplCopyWithImpl<$Res>;
|
||||
|
||||
factory _$$CommentImplCopyWith(
|
||||
_$CommentImpl value, $Res Function(_$CommentImpl) then) =
|
||||
__$$CommentImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call(
|
||||
@@ -352,8 +362,12 @@ abstract class _$$CommentImplCopyWith<$Res> implements $CommentCopyWith<$Res> {
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$CommentImplCopyWithImpl<$Res> extends _$CommentCopyWithImpl<$Res, _$CommentImpl> implements _$$CommentImplCopyWith<$Res> {
|
||||
__$$CommentImplCopyWithImpl(_$CommentImpl _value, $Res Function(_$CommentImpl) _then) : super(_value, _then);
|
||||
class __$$CommentImplCopyWithImpl<$Res>
|
||||
extends _$CommentCopyWithImpl<$Res, _$CommentImpl>
|
||||
implements _$$CommentImplCopyWith<$Res> {
|
||||
__$$CommentImplCopyWithImpl(
|
||||
_$CommentImpl _value, $Res Function(_$CommentImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of Comment
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -404,11 +418,13 @@ class _$CommentImpl implements _Comment {
|
||||
@JsonKey(name: "author_name") required this.authorName,
|
||||
@JsonKey(name: "author_profile_icon") required this.authorProfileIcon,
|
||||
@JsonKey(name: "body") required this.body,
|
||||
@JsonKey(name: "children_comments") required final List<Comment> childrenComments,
|
||||
@JsonKey(name: "children_comments")
|
||||
required final List<Comment> childrenComments,
|
||||
@JsonKey(name: "created_at") required this.createdAt})
|
||||
: _childrenComments = childrenComments;
|
||||
|
||||
factory _$CommentImpl.fromJson(Map<String, dynamic> json) => _$$CommentImplFromJson(json);
|
||||
factory _$CommentImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$CommentImplFromJson(json);
|
||||
|
||||
@override
|
||||
@JsonKey(name: "id")
|
||||
@@ -423,11 +439,11 @@ class _$CommentImpl implements _Comment {
|
||||
@JsonKey(name: "body")
|
||||
final String body;
|
||||
final List<Comment> _childrenComments;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "children_comments")
|
||||
List<Comment> get childrenComments {
|
||||
if (_childrenComments is EqualUnmodifiableListView) return _childrenComments;
|
||||
if (_childrenComments is EqualUnmodifiableListView)
|
||||
return _childrenComments;
|
||||
// ignore: implicit_dynamic_type
|
||||
return EqualUnmodifiableListView(_childrenComments);
|
||||
}
|
||||
@@ -447,23 +463,35 @@ class _$CommentImpl implements _Comment {
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$CommentImpl &&
|
||||
(identical(other.id, id) || other.id == id) &&
|
||||
(identical(other.authorName, authorName) || other.authorName == authorName) &&
|
||||
(identical(other.authorProfileIcon, authorProfileIcon) || other.authorProfileIcon == authorProfileIcon) &&
|
||||
(identical(other.authorName, authorName) ||
|
||||
other.authorName == authorName) &&
|
||||
(identical(other.authorProfileIcon, authorProfileIcon) ||
|
||||
other.authorProfileIcon == authorProfileIcon) &&
|
||||
(identical(other.body, body) || other.body == body) &&
|
||||
const DeepCollectionEquality().equals(other._childrenComments, _childrenComments) &&
|
||||
(identical(other.createdAt, createdAt) || other.createdAt == createdAt));
|
||||
const DeepCollectionEquality()
|
||||
.equals(other._childrenComments, _childrenComments) &&
|
||||
(identical(other.createdAt, createdAt) ||
|
||||
other.createdAt == createdAt));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType, id, authorName, authorProfileIcon, body, const DeepCollectionEquality().hash(_childrenComments), createdAt);
|
||||
int get hashCode => Object.hash(
|
||||
runtimeType,
|
||||
id,
|
||||
authorName,
|
||||
authorProfileIcon,
|
||||
body,
|
||||
const DeepCollectionEquality().hash(_childrenComments),
|
||||
createdAt);
|
||||
|
||||
/// Create a copy of Comment
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$CommentImplCopyWith<_$CommentImpl> get copyWith => __$$CommentImplCopyWithImpl<_$CommentImpl>(this, _$identity);
|
||||
_$$CommentImplCopyWith<_$CommentImpl> get copyWith =>
|
||||
__$$CommentImplCopyWithImpl<_$CommentImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
@@ -475,35 +503,33 @@ class _$CommentImpl implements _Comment {
|
||||
|
||||
abstract class _Comment implements Comment {
|
||||
const factory _Comment(
|
||||
{@JsonKey(name: "id") required final int id,
|
||||
@JsonKey(name: "author_name") required final String authorName,
|
||||
@JsonKey(name: "author_profile_icon") required final String authorProfileIcon,
|
||||
@JsonKey(name: "body") required final String body,
|
||||
@JsonKey(name: "children_comments") required final List<Comment> childrenComments,
|
||||
@JsonKey(name: "created_at") required final DateTime createdAt}) = _$CommentImpl;
|
||||
{@JsonKey(name: "id") required final int id,
|
||||
@JsonKey(name: "author_name") required final String authorName,
|
||||
@JsonKey(name: "author_profile_icon")
|
||||
required final String authorProfileIcon,
|
||||
@JsonKey(name: "body") required final String body,
|
||||
@JsonKey(name: "children_comments")
|
||||
required final List<Comment> childrenComments,
|
||||
@JsonKey(name: "created_at") required final DateTime createdAt}) =
|
||||
_$CommentImpl;
|
||||
|
||||
factory _Comment.fromJson(Map<String, dynamic> json) = _$CommentImpl.fromJson;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "id")
|
||||
int get id;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "author_name")
|
||||
String get authorName;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "author_profile_icon")
|
||||
String get authorProfileIcon;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "body")
|
||||
String get body;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "children_comments")
|
||||
List<Comment> get childrenComments;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "created_at")
|
||||
DateTime get createdAt;
|
||||
@@ -512,5 +538,6 @@ abstract class _Comment implements Comment {
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$CommentImplCopyWith<_$CommentImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
_$$CommentImplCopyWith<_$CommentImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -6,28 +6,36 @@ part of 'comment_model.dart';
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_$CommentModelImpl _$$CommentModelImplFromJson(Map<String, dynamic> json) => _$CommentModelImpl(
|
||||
data: (json['data'] as List<dynamic>).map((e) => Comment.fromJson(e as Map<String, dynamic>)).toList(),
|
||||
_$CommentModelImpl _$$CommentModelImplFromJson(Map<String, dynamic> json) =>
|
||||
_$CommentModelImpl(
|
||||
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>),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$CommentModelImplToJson(_$CommentModelImpl instance) => <String, dynamic>{
|
||||
Map<String, dynamic> _$$CommentModelImplToJson(_$CommentModelImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'data': instance.data,
|
||||
'links': instance.links,
|
||||
'meta': instance.meta,
|
||||
};
|
||||
|
||||
_$CommentImpl _$$CommentImplFromJson(Map<String, dynamic> json) => _$CommentImpl(
|
||||
_$CommentImpl _$$CommentImplFromJson(Map<String, dynamic> json) =>
|
||||
_$CommentImpl(
|
||||
id: (json['id'] as num).toInt(),
|
||||
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),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$CommentImplToJson(_$CommentImpl instance) => <String, dynamic>{
|
||||
Map<String, dynamic> _$$CommentImplToJson(_$CommentImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'id': instance.id,
|
||||
'author_name': instance.authorName,
|
||||
'author_profile_icon': instance.authorProfileIcon,
|
||||
|
||||
@@ -22,10 +22,8 @@ DietsPagination _$DietsPaginationFromJson(Map<String, dynamic> json) {
|
||||
mixin _$DietsPagination {
|
||||
@JsonKey(name: "data")
|
||||
List<Diet> get data => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "links")
|
||||
Links get links => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "meta")
|
||||
Meta get meta => throw _privateConstructorUsedError;
|
||||
|
||||
@@ -35,28 +33,32 @@ mixin _$DietsPagination {
|
||||
/// Create a copy of DietsPagination
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$DietsPaginationCopyWith<DietsPagination> get copyWith => throw _privateConstructorUsedError;
|
||||
$DietsPaginationCopyWith<DietsPagination> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $DietsPaginationCopyWith<$Res> {
|
||||
factory $DietsPaginationCopyWith(DietsPagination value, $Res Function(DietsPagination) then) = _$DietsPaginationCopyWithImpl<$Res, DietsPagination>;
|
||||
|
||||
factory $DietsPaginationCopyWith(
|
||||
DietsPagination value, $Res Function(DietsPagination) then) =
|
||||
_$DietsPaginationCopyWithImpl<$Res, DietsPagination>;
|
||||
@useResult
|
||||
$Res call({@JsonKey(name: "data") List<Diet> data, @JsonKey(name: "links") Links links, @JsonKey(name: "meta") Meta meta});
|
||||
$Res call(
|
||||
{@JsonKey(name: "data") List<Diet> data,
|
||||
@JsonKey(name: "links") Links links,
|
||||
@JsonKey(name: "meta") Meta meta});
|
||||
|
||||
$LinksCopyWith<$Res> get links;
|
||||
|
||||
$MetaCopyWith<$Res> get meta;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$DietsPaginationCopyWithImpl<$Res, $Val extends DietsPagination> implements $DietsPaginationCopyWith<$Res> {
|
||||
class _$DietsPaginationCopyWithImpl<$Res, $Val extends DietsPagination>
|
||||
implements $DietsPaginationCopyWith<$Res> {
|
||||
_$DietsPaginationCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
@@ -107,24 +109,31 @@ class _$DietsPaginationCopyWithImpl<$Res, $Val extends DietsPagination> implemen
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$DietsPaginationImplCopyWith<$Res> implements $DietsPaginationCopyWith<$Res> {
|
||||
factory _$$DietsPaginationImplCopyWith(_$DietsPaginationImpl value, $Res Function(_$DietsPaginationImpl) then) = __$$DietsPaginationImplCopyWithImpl<$Res>;
|
||||
|
||||
abstract class _$$DietsPaginationImplCopyWith<$Res>
|
||||
implements $DietsPaginationCopyWith<$Res> {
|
||||
factory _$$DietsPaginationImplCopyWith(_$DietsPaginationImpl value,
|
||||
$Res Function(_$DietsPaginationImpl) then) =
|
||||
__$$DietsPaginationImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call({@JsonKey(name: "data") List<Diet> data, @JsonKey(name: "links") Links links, @JsonKey(name: "meta") Meta meta});
|
||||
$Res call(
|
||||
{@JsonKey(name: "data") List<Diet> data,
|
||||
@JsonKey(name: "links") Links links,
|
||||
@JsonKey(name: "meta") Meta meta});
|
||||
|
||||
@override
|
||||
$LinksCopyWith<$Res> get links;
|
||||
|
||||
@override
|
||||
$MetaCopyWith<$Res> get meta;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$DietsPaginationImplCopyWithImpl<$Res> extends _$DietsPaginationCopyWithImpl<$Res, _$DietsPaginationImpl>
|
||||
class __$$DietsPaginationImplCopyWithImpl<$Res>
|
||||
extends _$DietsPaginationCopyWithImpl<$Res, _$DietsPaginationImpl>
|
||||
implements _$$DietsPaginationImplCopyWith<$Res> {
|
||||
__$$DietsPaginationImplCopyWithImpl(_$DietsPaginationImpl _value, $Res Function(_$DietsPaginationImpl) _then) : super(_value, _then);
|
||||
__$$DietsPaginationImplCopyWithImpl(
|
||||
_$DietsPaginationImpl _value, $Res Function(_$DietsPaginationImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of DietsPagination
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -156,13 +165,15 @@ class __$$DietsPaginationImplCopyWithImpl<$Res> extends _$DietsPaginationCopyWit
|
||||
@JsonSerializable()
|
||||
class _$DietsPaginationImpl implements _DietsPagination {
|
||||
const _$DietsPaginationImpl(
|
||||
{@JsonKey(name: "data") required final List<Diet> data, @JsonKey(name: "links") required this.links, @JsonKey(name: "meta") required this.meta})
|
||||
{@JsonKey(name: "data") required final List<Diet> data,
|
||||
@JsonKey(name: "links") required this.links,
|
||||
@JsonKey(name: "meta") required this.meta})
|
||||
: _data = data;
|
||||
|
||||
factory _$DietsPaginationImpl.fromJson(Map<String, dynamic> json) => _$$DietsPaginationImplFromJson(json);
|
||||
factory _$DietsPaginationImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$DietsPaginationImplFromJson(json);
|
||||
|
||||
final List<Diet> _data;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "data")
|
||||
List<Diet> get data {
|
||||
@@ -195,14 +206,17 @@ class _$DietsPaginationImpl implements _DietsPagination {
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType, const DeepCollectionEquality().hash(_data), links, meta);
|
||||
int get hashCode => Object.hash(
|
||||
runtimeType, const DeepCollectionEquality().hash(_data), links, meta);
|
||||
|
||||
/// Create a copy of DietsPagination
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$DietsPaginationImplCopyWith<_$DietsPaginationImpl> get copyWith => __$$DietsPaginationImplCopyWithImpl<_$DietsPaginationImpl>(this, _$identity);
|
||||
_$$DietsPaginationImplCopyWith<_$DietsPaginationImpl> get copyWith =>
|
||||
__$$DietsPaginationImplCopyWithImpl<_$DietsPaginationImpl>(
|
||||
this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
@@ -218,16 +232,15 @@ abstract class _DietsPagination implements DietsPagination {
|
||||
@JsonKey(name: "links") required final Links links,
|
||||
@JsonKey(name: "meta") required final Meta meta}) = _$DietsPaginationImpl;
|
||||
|
||||
factory _DietsPagination.fromJson(Map<String, dynamic> json) = _$DietsPaginationImpl.fromJson;
|
||||
factory _DietsPagination.fromJson(Map<String, dynamic> json) =
|
||||
_$DietsPaginationImpl.fromJson;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "data")
|
||||
List<Diet> get data;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "links")
|
||||
Links get links;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "meta")
|
||||
Meta get meta;
|
||||
@@ -236,7 +249,8 @@ abstract class _DietsPagination implements DietsPagination {
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$DietsPaginationImplCopyWith<_$DietsPaginationImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
_$$DietsPaginationImplCopyWith<_$DietsPaginationImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
Diet _$DietFromJson(Map<String, dynamic> json) {
|
||||
@@ -247,37 +261,27 @@ Diet _$DietFromJson(Map<String, dynamic> json) {
|
||||
mixin _$Diet {
|
||||
@JsonKey(name: "id")
|
||||
int get id => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "name")
|
||||
String get name => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "image")
|
||||
String get image => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "duration")
|
||||
int get duration => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "state")
|
||||
String get state => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "type")
|
||||
DietType get type => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "details")
|
||||
String get details => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "daily_schedule")
|
||||
List<List<List<DailySchedule>>> get dailySchedule => throw _privateConstructorUsedError;
|
||||
|
||||
List<List<List<DailySchedule>>> get dailySchedule =>
|
||||
throw _privateConstructorUsedError;
|
||||
@JsonKey(name: "author")
|
||||
Author get author => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "total_likes")
|
||||
int get totalLikes => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "total_views")
|
||||
int get totalViews => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "total_comments")
|
||||
int get totalComments => throw _privateConstructorUsedError;
|
||||
|
||||
@@ -292,8 +296,8 @@ mixin _$Diet {
|
||||
|
||||
/// @nodoc
|
||||
abstract class $DietCopyWith<$Res> {
|
||||
factory $DietCopyWith(Diet value, $Res Function(Diet) then) = _$DietCopyWithImpl<$Res, Diet>;
|
||||
|
||||
factory $DietCopyWith(Diet value, $Res Function(Diet) then) =
|
||||
_$DietCopyWithImpl<$Res, Diet>;
|
||||
@useResult
|
||||
$Res call(
|
||||
{@JsonKey(name: "id") int id,
|
||||
@@ -303,24 +307,24 @@ abstract class $DietCopyWith<$Res> {
|
||||
@JsonKey(name: "state") String state,
|
||||
@JsonKey(name: "type") DietType type,
|
||||
@JsonKey(name: "details") String details,
|
||||
@JsonKey(name: "daily_schedule") List<List<List<DailySchedule>>> dailySchedule,
|
||||
@JsonKey(name: "daily_schedule")
|
||||
List<List<List<DailySchedule>>> dailySchedule,
|
||||
@JsonKey(name: "author") Author author,
|
||||
@JsonKey(name: "total_likes") int totalLikes,
|
||||
@JsonKey(name: "total_views") int totalViews,
|
||||
@JsonKey(name: "total_comments") int totalComments});
|
||||
|
||||
$DietTypeCopyWith<$Res> get type;
|
||||
|
||||
$AuthorCopyWith<$Res> get author;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$DietCopyWithImpl<$Res, $Val extends Diet> implements $DietCopyWith<$Res> {
|
||||
class _$DietCopyWithImpl<$Res, $Val extends Diet>
|
||||
implements $DietCopyWith<$Res> {
|
||||
_$DietCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
@@ -417,8 +421,9 @@ class _$DietCopyWithImpl<$Res, $Val extends Diet> implements $DietCopyWith<$Res>
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$DietImplCopyWith<$Res> implements $DietCopyWith<$Res> {
|
||||
factory _$$DietImplCopyWith(_$DietImpl value, $Res Function(_$DietImpl) then) = __$$DietImplCopyWithImpl<$Res>;
|
||||
|
||||
factory _$$DietImplCopyWith(
|
||||
_$DietImpl value, $Res Function(_$DietImpl) then) =
|
||||
__$$DietImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call(
|
||||
@@ -429,7 +434,8 @@ abstract class _$$DietImplCopyWith<$Res> implements $DietCopyWith<$Res> {
|
||||
@JsonKey(name: "state") String state,
|
||||
@JsonKey(name: "type") DietType type,
|
||||
@JsonKey(name: "details") String details,
|
||||
@JsonKey(name: "daily_schedule") List<List<List<DailySchedule>>> dailySchedule,
|
||||
@JsonKey(name: "daily_schedule")
|
||||
List<List<List<DailySchedule>>> dailySchedule,
|
||||
@JsonKey(name: "author") Author author,
|
||||
@JsonKey(name: "total_likes") int totalLikes,
|
||||
@JsonKey(name: "total_views") int totalViews,
|
||||
@@ -437,14 +443,16 @@ abstract class _$$DietImplCopyWith<$Res> implements $DietCopyWith<$Res> {
|
||||
|
||||
@override
|
||||
$DietTypeCopyWith<$Res> get type;
|
||||
|
||||
@override
|
||||
$AuthorCopyWith<$Res> get author;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$DietImplCopyWithImpl<$Res> extends _$DietCopyWithImpl<$Res, _$DietImpl> implements _$$DietImplCopyWith<$Res> {
|
||||
__$$DietImplCopyWithImpl(_$DietImpl _value, $Res Function(_$DietImpl) _then) : super(_value, _then);
|
||||
class __$$DietImplCopyWithImpl<$Res>
|
||||
extends _$DietCopyWithImpl<$Res, _$DietImpl>
|
||||
implements _$$DietImplCopyWith<$Res> {
|
||||
__$$DietImplCopyWithImpl(_$DietImpl _value, $Res Function(_$DietImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of Diet
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -528,14 +536,16 @@ class _$DietImpl implements _Diet {
|
||||
@JsonKey(name: "state") required this.state,
|
||||
@JsonKey(name: "type") required this.type,
|
||||
@JsonKey(name: "details") required this.details,
|
||||
@JsonKey(name: "daily_schedule") required final List<List<List<DailySchedule>>> dailySchedule,
|
||||
@JsonKey(name: "daily_schedule")
|
||||
required final List<List<List<DailySchedule>>> dailySchedule,
|
||||
@JsonKey(name: "author") required this.author,
|
||||
@JsonKey(name: "total_likes") required this.totalLikes,
|
||||
@JsonKey(name: "total_views") required this.totalViews,
|
||||
@JsonKey(name: "total_comments") required this.totalComments})
|
||||
: _dailySchedule = dailySchedule;
|
||||
|
||||
factory _$DietImpl.fromJson(Map<String, dynamic> json) => _$$DietImplFromJson(json);
|
||||
factory _$DietImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$DietImplFromJson(json);
|
||||
|
||||
@override
|
||||
@JsonKey(name: "id")
|
||||
@@ -559,7 +569,6 @@ class _$DietImpl implements _Diet {
|
||||
@JsonKey(name: "details")
|
||||
final String details;
|
||||
final List<List<List<DailySchedule>>> _dailySchedule;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "daily_schedule")
|
||||
List<List<List<DailySchedule>>> get dailySchedule {
|
||||
@@ -594,28 +603,46 @@ class _$DietImpl implements _Diet {
|
||||
(identical(other.id, id) || other.id == id) &&
|
||||
(identical(other.name, name) || other.name == name) &&
|
||||
(identical(other.image, image) || other.image == image) &&
|
||||
(identical(other.duration, duration) || other.duration == duration) &&
|
||||
(identical(other.duration, duration) ||
|
||||
other.duration == duration) &&
|
||||
(identical(other.state, state) || other.state == state) &&
|
||||
(identical(other.type, type) || other.type == type) &&
|
||||
(identical(other.details, details) || other.details == details) &&
|
||||
const DeepCollectionEquality().equals(other._dailySchedule, _dailySchedule) &&
|
||||
const DeepCollectionEquality()
|
||||
.equals(other._dailySchedule, _dailySchedule) &&
|
||||
(identical(other.author, author) || other.author == author) &&
|
||||
(identical(other.totalLikes, totalLikes) || other.totalLikes == totalLikes) &&
|
||||
(identical(other.totalViews, totalViews) || other.totalViews == totalViews) &&
|
||||
(identical(other.totalComments, totalComments) || other.totalComments == totalComments));
|
||||
(identical(other.totalLikes, totalLikes) ||
|
||||
other.totalLikes == totalLikes) &&
|
||||
(identical(other.totalViews, totalViews) ||
|
||||
other.totalViews == totalViews) &&
|
||||
(identical(other.totalComments, totalComments) ||
|
||||
other.totalComments == totalComments));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType, id, name, image, duration, state, type, details, const DeepCollectionEquality().hash(_dailySchedule), author,
|
||||
totalLikes, totalViews, totalComments);
|
||||
int get hashCode => Object.hash(
|
||||
runtimeType,
|
||||
id,
|
||||
name,
|
||||
image,
|
||||
duration,
|
||||
state,
|
||||
type,
|
||||
details,
|
||||
const DeepCollectionEquality().hash(_dailySchedule),
|
||||
author,
|
||||
totalLikes,
|
||||
totalViews,
|
||||
totalComments);
|
||||
|
||||
/// Create a copy of Diet
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$DietImplCopyWith<_$DietImpl> get copyWith => __$$DietImplCopyWithImpl<_$DietImpl>(this, _$identity);
|
||||
_$$DietImplCopyWith<_$DietImpl> get copyWith =>
|
||||
__$$DietImplCopyWithImpl<_$DietImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
@@ -627,65 +654,56 @@ class _$DietImpl implements _Diet {
|
||||
|
||||
abstract class _Diet implements Diet {
|
||||
const factory _Diet(
|
||||
{@JsonKey(name: "id") required final int id,
|
||||
@JsonKey(name: "name") required final String name,
|
||||
@JsonKey(name: "image") required final String image,
|
||||
@JsonKey(name: "duration") required final int duration,
|
||||
@JsonKey(name: "state") required final String state,
|
||||
@JsonKey(name: "type") required final DietType type,
|
||||
@JsonKey(name: "details") required final String details,
|
||||
@JsonKey(name: "daily_schedule") required final List<List<List<DailySchedule>>> dailySchedule,
|
||||
@JsonKey(name: "author") required final Author author,
|
||||
@JsonKey(name: "total_likes") required final int totalLikes,
|
||||
@JsonKey(name: "total_views") required final int totalViews,
|
||||
@JsonKey(name: "total_comments") required final int totalComments}) = _$DietImpl;
|
||||
{@JsonKey(name: "id") required final int id,
|
||||
@JsonKey(name: "name") required final String name,
|
||||
@JsonKey(name: "image") required final String image,
|
||||
@JsonKey(name: "duration") required final int duration,
|
||||
@JsonKey(name: "state") required final String state,
|
||||
@JsonKey(name: "type") required final DietType type,
|
||||
@JsonKey(name: "details") required final String details,
|
||||
@JsonKey(name: "daily_schedule")
|
||||
required final List<List<List<DailySchedule>>> dailySchedule,
|
||||
@JsonKey(name: "author") required final Author author,
|
||||
@JsonKey(name: "total_likes") required final int totalLikes,
|
||||
@JsonKey(name: "total_views") required final int totalViews,
|
||||
@JsonKey(name: "total_comments") required final int totalComments}) =
|
||||
_$DietImpl;
|
||||
|
||||
factory _Diet.fromJson(Map<String, dynamic> json) = _$DietImpl.fromJson;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "id")
|
||||
int get id;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "name")
|
||||
String get name;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "image")
|
||||
String get image;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "duration")
|
||||
int get duration;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "state")
|
||||
String get state;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "type")
|
||||
DietType get type;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "details")
|
||||
String get details;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "daily_schedule")
|
||||
List<List<List<DailySchedule>>> get dailySchedule;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "author")
|
||||
Author get author;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "total_likes")
|
||||
int get totalLikes;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "total_views")
|
||||
int get totalViews;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "total_comments")
|
||||
int get totalComments;
|
||||
@@ -694,7 +712,8 @@ abstract class _Diet implements Diet {
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$DietImplCopyWith<_$DietImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
_$$DietImplCopyWith<_$DietImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
Author _$AuthorFromJson(Map<String, dynamic> json) {
|
||||
@@ -705,13 +724,10 @@ Author _$AuthorFromJson(Map<String, dynamic> json) {
|
||||
mixin _$Author {
|
||||
@JsonKey(name: "author_slug")
|
||||
String get authorSlug => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "author_name")
|
||||
String get authorName => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "author_profile_icon")
|
||||
String get authorProfileIcon => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "author_is_me")
|
||||
bool get authorIsMe => throw _privateConstructorUsedError;
|
||||
|
||||
@@ -726,8 +742,8 @@ mixin _$Author {
|
||||
|
||||
/// @nodoc
|
||||
abstract class $AuthorCopyWith<$Res> {
|
||||
factory $AuthorCopyWith(Author value, $Res Function(Author) then) = _$AuthorCopyWithImpl<$Res, Author>;
|
||||
|
||||
factory $AuthorCopyWith(Author value, $Res Function(Author) then) =
|
||||
_$AuthorCopyWithImpl<$Res, Author>;
|
||||
@useResult
|
||||
$Res call(
|
||||
{@JsonKey(name: "author_slug") String authorSlug,
|
||||
@@ -737,12 +753,12 @@ abstract class $AuthorCopyWith<$Res> {
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$AuthorCopyWithImpl<$Res, $Val extends Author> implements $AuthorCopyWith<$Res> {
|
||||
class _$AuthorCopyWithImpl<$Res, $Val extends Author>
|
||||
implements $AuthorCopyWith<$Res> {
|
||||
_$AuthorCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
@@ -779,8 +795,9 @@ class _$AuthorCopyWithImpl<$Res, $Val extends Author> implements $AuthorCopyWith
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$AuthorImplCopyWith<$Res> implements $AuthorCopyWith<$Res> {
|
||||
factory _$$AuthorImplCopyWith(_$AuthorImpl value, $Res Function(_$AuthorImpl) then) = __$$AuthorImplCopyWithImpl<$Res>;
|
||||
|
||||
factory _$$AuthorImplCopyWith(
|
||||
_$AuthorImpl value, $Res Function(_$AuthorImpl) then) =
|
||||
__$$AuthorImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call(
|
||||
@@ -791,8 +808,12 @@ abstract class _$$AuthorImplCopyWith<$Res> implements $AuthorCopyWith<$Res> {
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$AuthorImplCopyWithImpl<$Res> extends _$AuthorCopyWithImpl<$Res, _$AuthorImpl> implements _$$AuthorImplCopyWith<$Res> {
|
||||
__$$AuthorImplCopyWithImpl(_$AuthorImpl _value, $Res Function(_$AuthorImpl) _then) : super(_value, _then);
|
||||
class __$$AuthorImplCopyWithImpl<$Res>
|
||||
extends _$AuthorCopyWithImpl<$Res, _$AuthorImpl>
|
||||
implements _$$AuthorImplCopyWith<$Res> {
|
||||
__$$AuthorImplCopyWithImpl(
|
||||
_$AuthorImpl _value, $Res Function(_$AuthorImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of Author
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -834,7 +855,8 @@ class _$AuthorImpl implements _Author {
|
||||
@JsonKey(name: "author_profile_icon") required this.authorProfileIcon,
|
||||
@JsonKey(name: "author_is_me") required this.authorIsMe});
|
||||
|
||||
factory _$AuthorImpl.fromJson(Map<String, dynamic> json) => _$$AuthorImplFromJson(json);
|
||||
factory _$AuthorImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$AuthorImplFromJson(json);
|
||||
|
||||
@override
|
||||
@JsonKey(name: "author_slug")
|
||||
@@ -859,22 +881,28 @@ class _$AuthorImpl implements _Author {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$AuthorImpl &&
|
||||
(identical(other.authorSlug, authorSlug) || other.authorSlug == authorSlug) &&
|
||||
(identical(other.authorName, authorName) || other.authorName == authorName) &&
|
||||
(identical(other.authorProfileIcon, authorProfileIcon) || other.authorProfileIcon == authorProfileIcon) &&
|
||||
(identical(other.authorIsMe, authorIsMe) || other.authorIsMe == authorIsMe));
|
||||
(identical(other.authorSlug, authorSlug) ||
|
||||
other.authorSlug == authorSlug) &&
|
||||
(identical(other.authorName, authorName) ||
|
||||
other.authorName == authorName) &&
|
||||
(identical(other.authorProfileIcon, authorProfileIcon) ||
|
||||
other.authorProfileIcon == authorProfileIcon) &&
|
||||
(identical(other.authorIsMe, authorIsMe) ||
|
||||
other.authorIsMe == authorIsMe));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType, authorSlug, authorName, authorProfileIcon, authorIsMe);
|
||||
int get hashCode => Object.hash(
|
||||
runtimeType, authorSlug, authorName, authorProfileIcon, authorIsMe);
|
||||
|
||||
/// Create a copy of Author
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$AuthorImplCopyWith<_$AuthorImpl> get copyWith => __$$AuthorImplCopyWithImpl<_$AuthorImpl>(this, _$identity);
|
||||
_$$AuthorImplCopyWith<_$AuthorImpl> get copyWith =>
|
||||
__$$AuthorImplCopyWithImpl<_$AuthorImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
@@ -886,25 +914,24 @@ class _$AuthorImpl implements _Author {
|
||||
|
||||
abstract class _Author implements Author {
|
||||
const factory _Author(
|
||||
{@JsonKey(name: "author_slug") required final String authorSlug,
|
||||
@JsonKey(name: "author_name") required final String authorName,
|
||||
@JsonKey(name: "author_profile_icon") required final String authorProfileIcon,
|
||||
@JsonKey(name: "author_is_me") required final bool authorIsMe}) = _$AuthorImpl;
|
||||
{@JsonKey(name: "author_slug") required final String authorSlug,
|
||||
@JsonKey(name: "author_name") required final String authorName,
|
||||
@JsonKey(name: "author_profile_icon")
|
||||
required final String authorProfileIcon,
|
||||
@JsonKey(name: "author_is_me") required final bool authorIsMe}) =
|
||||
_$AuthorImpl;
|
||||
|
||||
factory _Author.fromJson(Map<String, dynamic> json) = _$AuthorImpl.fromJson;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "author_slug")
|
||||
String get authorSlug;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "author_name")
|
||||
String get authorName;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "author_profile_icon")
|
||||
String get authorProfileIcon;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "author_is_me")
|
||||
bool get authorIsMe;
|
||||
@@ -913,7 +940,8 @@ abstract class _Author implements Author {
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$AuthorImplCopyWith<_$AuthorImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
_$$AuthorImplCopyWith<_$AuthorImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
DailySchedule _$DailyScheduleFromJson(Map<String, dynamic> json) {
|
||||
@@ -924,13 +952,10 @@ DailySchedule _$DailyScheduleFromJson(Map<String, dynamic> json) {
|
||||
mixin _$DailySchedule {
|
||||
@JsonKey(name: "name")
|
||||
String get name => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "uniq")
|
||||
String get uniq => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "portion")
|
||||
Portion get portion => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "quantity")
|
||||
int get quantity => throw _privateConstructorUsedError;
|
||||
|
||||
@@ -940,13 +965,15 @@ mixin _$DailySchedule {
|
||||
/// Create a copy of DailySchedule
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$DailyScheduleCopyWith<DailySchedule> get copyWith => throw _privateConstructorUsedError;
|
||||
$DailyScheduleCopyWith<DailySchedule> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $DailyScheduleCopyWith<$Res> {
|
||||
factory $DailyScheduleCopyWith(DailySchedule value, $Res Function(DailySchedule) then) = _$DailyScheduleCopyWithImpl<$Res, DailySchedule>;
|
||||
|
||||
factory $DailyScheduleCopyWith(
|
||||
DailySchedule value, $Res Function(DailySchedule) then) =
|
||||
_$DailyScheduleCopyWithImpl<$Res, DailySchedule>;
|
||||
@useResult
|
||||
$Res call(
|
||||
{@JsonKey(name: "name") String name,
|
||||
@@ -956,12 +983,12 @@ abstract class $DailyScheduleCopyWith<$Res> {
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$DailyScheduleCopyWithImpl<$Res, $Val extends DailySchedule> implements $DailyScheduleCopyWith<$Res> {
|
||||
class _$DailyScheduleCopyWithImpl<$Res, $Val extends DailySchedule>
|
||||
implements $DailyScheduleCopyWith<$Res> {
|
||||
_$DailyScheduleCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
@@ -997,9 +1024,11 @@ class _$DailyScheduleCopyWithImpl<$Res, $Val extends DailySchedule> implements $
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$DailyScheduleImplCopyWith<$Res> implements $DailyScheduleCopyWith<$Res> {
|
||||
factory _$$DailyScheduleImplCopyWith(_$DailyScheduleImpl value, $Res Function(_$DailyScheduleImpl) then) = __$$DailyScheduleImplCopyWithImpl<$Res>;
|
||||
|
||||
abstract class _$$DailyScheduleImplCopyWith<$Res>
|
||||
implements $DailyScheduleCopyWith<$Res> {
|
||||
factory _$$DailyScheduleImplCopyWith(
|
||||
_$DailyScheduleImpl value, $Res Function(_$DailyScheduleImpl) then) =
|
||||
__$$DailyScheduleImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call(
|
||||
@@ -1010,8 +1039,12 @@ abstract class _$$DailyScheduleImplCopyWith<$Res> implements $DailyScheduleCopyW
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$DailyScheduleImplCopyWithImpl<$Res> extends _$DailyScheduleCopyWithImpl<$Res, _$DailyScheduleImpl> implements _$$DailyScheduleImplCopyWith<$Res> {
|
||||
__$$DailyScheduleImplCopyWithImpl(_$DailyScheduleImpl _value, $Res Function(_$DailyScheduleImpl) _then) : super(_value, _then);
|
||||
class __$$DailyScheduleImplCopyWithImpl<$Res>
|
||||
extends _$DailyScheduleCopyWithImpl<$Res, _$DailyScheduleImpl>
|
||||
implements _$$DailyScheduleImplCopyWith<$Res> {
|
||||
__$$DailyScheduleImplCopyWithImpl(
|
||||
_$DailyScheduleImpl _value, $Res Function(_$DailyScheduleImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of DailySchedule
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -1053,7 +1086,8 @@ class _$DailyScheduleImpl implements _DailySchedule {
|
||||
@JsonKey(name: "portion") required this.portion,
|
||||
@JsonKey(name: "quantity") required this.quantity});
|
||||
|
||||
factory _$DailyScheduleImpl.fromJson(Map<String, dynamic> json) => _$$DailyScheduleImplFromJson(json);
|
||||
factory _$DailyScheduleImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$DailyScheduleImplFromJson(json);
|
||||
|
||||
@override
|
||||
@JsonKey(name: "name")
|
||||
@@ -1081,7 +1115,8 @@ class _$DailyScheduleImpl implements _DailySchedule {
|
||||
(identical(other.name, name) || other.name == name) &&
|
||||
(identical(other.uniq, uniq) || other.uniq == uniq) &&
|
||||
(identical(other.portion, portion) || other.portion == portion) &&
|
||||
(identical(other.quantity, quantity) || other.quantity == quantity));
|
||||
(identical(other.quantity, quantity) ||
|
||||
other.quantity == quantity));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@@ -1093,7 +1128,8 @@ class _$DailyScheduleImpl implements _DailySchedule {
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$DailyScheduleImplCopyWith<_$DailyScheduleImpl> get copyWith => __$$DailyScheduleImplCopyWithImpl<_$DailyScheduleImpl>(this, _$identity);
|
||||
_$$DailyScheduleImplCopyWith<_$DailyScheduleImpl> get copyWith =>
|
||||
__$$DailyScheduleImplCopyWithImpl<_$DailyScheduleImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
@@ -1105,25 +1141,24 @@ class _$DailyScheduleImpl implements _DailySchedule {
|
||||
|
||||
abstract class _DailySchedule implements DailySchedule {
|
||||
const factory _DailySchedule(
|
||||
{@JsonKey(name: "name") required final String name,
|
||||
@JsonKey(name: "uniq") required final String uniq,
|
||||
@JsonKey(name: "portion") required final Portion portion,
|
||||
@JsonKey(name: "quantity") required final int quantity}) = _$DailyScheduleImpl;
|
||||
{@JsonKey(name: "name") required final String name,
|
||||
@JsonKey(name: "uniq") required final String uniq,
|
||||
@JsonKey(name: "portion") required final Portion portion,
|
||||
@JsonKey(name: "quantity") required final int quantity}) =
|
||||
_$DailyScheduleImpl;
|
||||
|
||||
factory _DailySchedule.fromJson(Map<String, dynamic> json) = _$DailyScheduleImpl.fromJson;
|
||||
factory _DailySchedule.fromJson(Map<String, dynamic> json) =
|
||||
_$DailyScheduleImpl.fromJson;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "name")
|
||||
String get name;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "uniq")
|
||||
String get uniq;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "portion")
|
||||
Portion get portion;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "quantity")
|
||||
int get quantity;
|
||||
@@ -1132,7 +1167,8 @@ abstract class _DailySchedule implements DailySchedule {
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$DailyScheduleImplCopyWith<_$DailyScheduleImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
_$$DailyScheduleImplCopyWith<_$DailyScheduleImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
DietType _$DietTypeFromJson(Map<String, dynamic> json) {
|
||||
@@ -1143,13 +1179,10 @@ DietType _$DietTypeFromJson(Map<String, dynamic> json) {
|
||||
mixin _$DietType {
|
||||
@JsonKey(name: "alko")
|
||||
bool? get alko => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "veg")
|
||||
bool? get veg => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "corb")
|
||||
bool? get corb => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "meat")
|
||||
bool? get meat => throw _privateConstructorUsedError;
|
||||
|
||||
@@ -1159,24 +1192,29 @@ mixin _$DietType {
|
||||
/// Create a copy of DietType
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$DietTypeCopyWith<DietType> get copyWith => throw _privateConstructorUsedError;
|
||||
$DietTypeCopyWith<DietType> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $DietTypeCopyWith<$Res> {
|
||||
factory $DietTypeCopyWith(DietType value, $Res Function(DietType) then) = _$DietTypeCopyWithImpl<$Res, DietType>;
|
||||
|
||||
factory $DietTypeCopyWith(DietType value, $Res Function(DietType) then) =
|
||||
_$DietTypeCopyWithImpl<$Res, DietType>;
|
||||
@useResult
|
||||
$Res call({@JsonKey(name: "alko") bool? alko, @JsonKey(name: "veg") bool? veg, @JsonKey(name: "corb") bool? corb, @JsonKey(name: "meat") bool? meat});
|
||||
$Res call(
|
||||
{@JsonKey(name: "alko") bool? alko,
|
||||
@JsonKey(name: "veg") bool? veg,
|
||||
@JsonKey(name: "corb") bool? corb,
|
||||
@JsonKey(name: "meat") bool? meat});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$DietTypeCopyWithImpl<$Res, $Val extends DietType> implements $DietTypeCopyWith<$Res> {
|
||||
class _$DietTypeCopyWithImpl<$Res, $Val extends DietType>
|
||||
implements $DietTypeCopyWith<$Res> {
|
||||
_$DietTypeCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
@@ -1212,17 +1250,27 @@ class _$DietTypeCopyWithImpl<$Res, $Val extends DietType> implements $DietTypeCo
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$DietTypeImplCopyWith<$Res> implements $DietTypeCopyWith<$Res> {
|
||||
factory _$$DietTypeImplCopyWith(_$DietTypeImpl value, $Res Function(_$DietTypeImpl) then) = __$$DietTypeImplCopyWithImpl<$Res>;
|
||||
|
||||
abstract class _$$DietTypeImplCopyWith<$Res>
|
||||
implements $DietTypeCopyWith<$Res> {
|
||||
factory _$$DietTypeImplCopyWith(
|
||||
_$DietTypeImpl value, $Res Function(_$DietTypeImpl) then) =
|
||||
__$$DietTypeImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call({@JsonKey(name: "alko") bool? alko, @JsonKey(name: "veg") bool? veg, @JsonKey(name: "corb") bool? corb, @JsonKey(name: "meat") bool? meat});
|
||||
$Res call(
|
||||
{@JsonKey(name: "alko") bool? alko,
|
||||
@JsonKey(name: "veg") bool? veg,
|
||||
@JsonKey(name: "corb") bool? corb,
|
||||
@JsonKey(name: "meat") bool? meat});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$DietTypeImplCopyWithImpl<$Res> extends _$DietTypeCopyWithImpl<$Res, _$DietTypeImpl> implements _$$DietTypeImplCopyWith<$Res> {
|
||||
__$$DietTypeImplCopyWithImpl(_$DietTypeImpl _value, $Res Function(_$DietTypeImpl) _then) : super(_value, _then);
|
||||
class __$$DietTypeImplCopyWithImpl<$Res>
|
||||
extends _$DietTypeCopyWithImpl<$Res, _$DietTypeImpl>
|
||||
implements _$$DietTypeImplCopyWith<$Res> {
|
||||
__$$DietTypeImplCopyWithImpl(
|
||||
_$DietTypeImpl _value, $Res Function(_$DietTypeImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of DietType
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -1258,9 +1306,14 @@ class __$$DietTypeImplCopyWithImpl<$Res> extends _$DietTypeCopyWithImpl<$Res, _$
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
class _$DietTypeImpl implements _DietType {
|
||||
const _$DietTypeImpl({@JsonKey(name: "alko") this.alko, @JsonKey(name: "veg") this.veg, @JsonKey(name: "corb") this.corb, @JsonKey(name: "meat") this.meat});
|
||||
const _$DietTypeImpl(
|
||||
{@JsonKey(name: "alko") this.alko,
|
||||
@JsonKey(name: "veg") this.veg,
|
||||
@JsonKey(name: "corb") this.corb,
|
||||
@JsonKey(name: "meat") this.meat});
|
||||
|
||||
factory _$DietTypeImpl.fromJson(Map<String, dynamic> json) => _$$DietTypeImplFromJson(json);
|
||||
factory _$DietTypeImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$DietTypeImplFromJson(json);
|
||||
|
||||
@override
|
||||
@JsonKey(name: "alko")
|
||||
@@ -1300,7 +1353,8 @@ class _$DietTypeImpl implements _DietType {
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$DietTypeImplCopyWith<_$DietTypeImpl> get copyWith => __$$DietTypeImplCopyWithImpl<_$DietTypeImpl>(this, _$identity);
|
||||
_$$DietTypeImplCopyWith<_$DietTypeImpl> get copyWith =>
|
||||
__$$DietTypeImplCopyWithImpl<_$DietTypeImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
@@ -1317,20 +1371,18 @@ abstract class _DietType implements DietType {
|
||||
@JsonKey(name: "corb") final bool? corb,
|
||||
@JsonKey(name: "meat") final bool? meat}) = _$DietTypeImpl;
|
||||
|
||||
factory _DietType.fromJson(Map<String, dynamic> json) = _$DietTypeImpl.fromJson;
|
||||
factory _DietType.fromJson(Map<String, dynamic> json) =
|
||||
_$DietTypeImpl.fromJson;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "alko")
|
||||
bool? get alko;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "veg")
|
||||
bool? get veg;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "corb")
|
||||
bool? get corb;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "meat")
|
||||
bool? get meat;
|
||||
@@ -1339,5 +1391,6 @@ abstract class _DietType implements DietType {
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$DietTypeImplCopyWith<_$DietTypeImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
_$$DietTypeImplCopyWith<_$DietTypeImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -6,13 +6,19 @@ part of 'diets_pagination_model.dart';
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_$DietsPaginationImpl _$$DietsPaginationImplFromJson(Map<String, dynamic> json) => _$DietsPaginationImpl(
|
||||
data: (json['data'] as List<dynamic>).map((e) => Diet.fromJson(e as Map<String, dynamic>)).toList(),
|
||||
_$DietsPaginationImpl _$$DietsPaginationImplFromJson(
|
||||
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>),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$DietsPaginationImplToJson(_$DietsPaginationImpl instance) => <String, dynamic>{
|
||||
Map<String, dynamic> _$$DietsPaginationImplToJson(
|
||||
_$DietsPaginationImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'data': instance.data,
|
||||
'links': instance.links,
|
||||
'meta': instance.meta,
|
||||
@@ -27,7 +33,11 @@ _$DietImpl _$$DietImplFromJson(Map<String, dynamic> json) => _$DietImpl(
|
||||
type: DietType.fromJson(json['type'] as Map<String, dynamic>),
|
||||
details: json['details'] as String,
|
||||
dailySchedule: (json['daily_schedule'] as List<dynamic>)
|
||||
.map((e) => (e as List<dynamic>).map((e) => (e as List<dynamic>).map((e) => DailySchedule.fromJson(e as Map<String, dynamic>)).toList()).toList())
|
||||
.map((e) => (e as List<dynamic>)
|
||||
.map((e) => (e as List<dynamic>)
|
||||
.map((e) => DailySchedule.fromJson(e as Map<String, dynamic>))
|
||||
.toList())
|
||||
.toList())
|
||||
.toList(),
|
||||
author: Author.fromJson(json['author'] as Map<String, dynamic>),
|
||||
totalLikes: (json['total_likes'] as num).toInt(),
|
||||
@@ -35,7 +45,8 @@ _$DietImpl _$$DietImplFromJson(Map<String, dynamic> json) => _$DietImpl(
|
||||
totalComments: (json['total_comments'] as num).toInt(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$DietImplToJson(_$DietImpl instance) => <String, dynamic>{
|
||||
Map<String, dynamic> _$$DietImplToJson(_$DietImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'id': instance.id,
|
||||
'name': instance.name,
|
||||
'image': instance.image,
|
||||
@@ -57,21 +68,24 @@ _$AuthorImpl _$$AuthorImplFromJson(Map<String, dynamic> json) => _$AuthorImpl(
|
||||
authorIsMe: json['author_is_me'] as bool,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$AuthorImplToJson(_$AuthorImpl instance) => <String, dynamic>{
|
||||
Map<String, dynamic> _$$AuthorImplToJson(_$AuthorImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'author_slug': instance.authorSlug,
|
||||
'author_name': instance.authorName,
|
||||
'author_profile_icon': instance.authorProfileIcon,
|
||||
'author_is_me': instance.authorIsMe,
|
||||
};
|
||||
|
||||
_$DailyScheduleImpl _$$DailyScheduleImplFromJson(Map<String, dynamic> json) => _$DailyScheduleImpl(
|
||||
_$DailyScheduleImpl _$$DailyScheduleImplFromJson(Map<String, dynamic> json) =>
|
||||
_$DailyScheduleImpl(
|
||||
name: json['name'] as String,
|
||||
uniq: json['uniq'] as String,
|
||||
portion: $enumDecode(_$PortionEnumMap, json['portion']),
|
||||
quantity: (json['quantity'] as num).toInt(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$DailyScheduleImplToJson(_$DailyScheduleImpl instance) => <String, dynamic>{
|
||||
Map<String, dynamic> _$$DailyScheduleImplToJson(_$DailyScheduleImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'name': instance.name,
|
||||
'uniq': instance.uniq,
|
||||
'portion': _$PortionEnumMap[instance.portion]!,
|
||||
@@ -84,14 +98,16 @@ const _$PortionEnumMap = {
|
||||
Portion.PCS: 'pcs',
|
||||
};
|
||||
|
||||
_$DietTypeImpl _$$DietTypeImplFromJson(Map<String, dynamic> json) => _$DietTypeImpl(
|
||||
_$DietTypeImpl _$$DietTypeImplFromJson(Map<String, dynamic> json) =>
|
||||
_$DietTypeImpl(
|
||||
alko: json['alko'] as bool?,
|
||||
veg: json['veg'] as bool?,
|
||||
corb: json['corb'] as bool?,
|
||||
meat: json['meat'] as bool?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$DietTypeImplToJson(_$DietTypeImpl instance) => <String, dynamic>{
|
||||
Map<String, dynamic> _$$DietTypeImplToJson(_$DietTypeImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'alko': instance.alko,
|
||||
'veg': instance.veg,
|
||||
'corb': instance.corb,
|
||||
|
||||
@@ -21,35 +21,23 @@ FeedBlogPostModel _$FeedBlogPostModelFromJson(Map<String, dynamic> json) {
|
||||
/// @nodoc
|
||||
mixin _$FeedBlogPostModel {
|
||||
int get id => throw _privateConstructorUsedError;
|
||||
|
||||
String get state => throw _privateConstructorUsedError;
|
||||
|
||||
String get image => throw _privateConstructorUsedError;
|
||||
|
||||
String get description => throw _privateConstructorUsedError;
|
||||
|
||||
Author get author => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "youtube_url")
|
||||
String get youtubeUrl => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "created_at")
|
||||
DateTime get createdAt => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "updated_at")
|
||||
DateTime get updatedAt => throw _privateConstructorUsedError;
|
||||
|
||||
String get title => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "total_likes")
|
||||
int get totalLikes => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "total_views")
|
||||
int get totalViews => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "total_comments")
|
||||
int get totalComments => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: "was_liked_by_me")
|
||||
bool get wasLikedByMe => throw _privateConstructorUsedError;
|
||||
|
||||
@@ -59,13 +47,15 @@ mixin _$FeedBlogPostModel {
|
||||
/// Create a copy of FeedBlogPostModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$FeedBlogPostModelCopyWith<FeedBlogPostModel> get copyWith => throw _privateConstructorUsedError;
|
||||
$FeedBlogPostModelCopyWith<FeedBlogPostModel> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $FeedBlogPostModelCopyWith<$Res> {
|
||||
factory $FeedBlogPostModelCopyWith(FeedBlogPostModel value, $Res Function(FeedBlogPostModel) then) = _$FeedBlogPostModelCopyWithImpl<$Res, FeedBlogPostModel>;
|
||||
|
||||
factory $FeedBlogPostModelCopyWith(
|
||||
FeedBlogPostModel value, $Res Function(FeedBlogPostModel) then) =
|
||||
_$FeedBlogPostModelCopyWithImpl<$Res, FeedBlogPostModel>;
|
||||
@useResult
|
||||
$Res call(
|
||||
{int id,
|
||||
@@ -86,12 +76,12 @@ abstract class $FeedBlogPostModelCopyWith<$Res> {
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$FeedBlogPostModelCopyWithImpl<$Res, $Val extends FeedBlogPostModel> implements $FeedBlogPostModelCopyWith<$Res> {
|
||||
class _$FeedBlogPostModelCopyWithImpl<$Res, $Val extends FeedBlogPostModel>
|
||||
implements $FeedBlogPostModelCopyWith<$Res> {
|
||||
_$FeedBlogPostModelCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
@@ -182,10 +172,11 @@ class _$FeedBlogPostModelCopyWithImpl<$Res, $Val extends FeedBlogPostModel> impl
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$FeedBlogPostModelImplCopyWith<$Res> implements $FeedBlogPostModelCopyWith<$Res> {
|
||||
factory _$$FeedBlogPostModelImplCopyWith(_$FeedBlogPostModelImpl value, $Res Function(_$FeedBlogPostModelImpl) then) =
|
||||
abstract class _$$FeedBlogPostModelImplCopyWith<$Res>
|
||||
implements $FeedBlogPostModelCopyWith<$Res> {
|
||||
factory _$$FeedBlogPostModelImplCopyWith(_$FeedBlogPostModelImpl value,
|
||||
$Res Function(_$FeedBlogPostModelImpl) then) =
|
||||
__$$FeedBlogPostModelImplCopyWithImpl<$Res>;
|
||||
|
||||
@override
|
||||
@useResult
|
||||
$Res call(
|
||||
@@ -208,9 +199,12 @@ abstract class _$$FeedBlogPostModelImplCopyWith<$Res> implements $FeedBlogPostMo
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$FeedBlogPostModelImplCopyWithImpl<$Res> extends _$FeedBlogPostModelCopyWithImpl<$Res, _$FeedBlogPostModelImpl>
|
||||
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.
|
||||
@@ -306,7 +300,8 @@ class _$FeedBlogPostModelImpl implements _FeedBlogPostModel {
|
||||
@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);
|
||||
factory _$FeedBlogPostModelImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$FeedBlogPostModelImplFromJson(json);
|
||||
|
||||
@override
|
||||
final int id;
|
||||
@@ -355,29 +350,52 @@ class _$FeedBlogPostModelImpl implements _FeedBlogPostModel {
|
||||
(identical(other.id, id) || other.id == id) &&
|
||||
(identical(other.state, state) || other.state == state) &&
|
||||
(identical(other.image, image) || other.image == image) &&
|
||||
(identical(other.description, description) || other.description == description) &&
|
||||
(identical(other.description, description) ||
|
||||
other.description == description) &&
|
||||
(identical(other.author, author) || other.author == author) &&
|
||||
(identical(other.youtubeUrl, youtubeUrl) || other.youtubeUrl == youtubeUrl) &&
|
||||
(identical(other.createdAt, createdAt) || other.createdAt == createdAt) &&
|
||||
(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt) &&
|
||||
(identical(other.youtubeUrl, youtubeUrl) ||
|
||||
other.youtubeUrl == youtubeUrl) &&
|
||||
(identical(other.createdAt, createdAt) ||
|
||||
other.createdAt == createdAt) &&
|
||||
(identical(other.updatedAt, updatedAt) ||
|
||||
other.updatedAt == updatedAt) &&
|
||||
(identical(other.title, title) || other.title == title) &&
|
||||
(identical(other.totalLikes, totalLikes) || other.totalLikes == totalLikes) &&
|
||||
(identical(other.totalViews, totalViews) || other.totalViews == totalViews) &&
|
||||
(identical(other.totalComments, totalComments) || other.totalComments == totalComments) &&
|
||||
(identical(other.wasLikedByMe, wasLikedByMe) || other.wasLikedByMe == wasLikedByMe));
|
||||
(identical(other.totalLikes, totalLikes) ||
|
||||
other.totalLikes == totalLikes) &&
|
||||
(identical(other.totalViews, totalViews) ||
|
||||
other.totalViews == totalViews) &&
|
||||
(identical(other.totalComments, totalComments) ||
|
||||
other.totalComments == totalComments) &&
|
||||
(identical(other.wasLikedByMe, wasLikedByMe) ||
|
||||
other.wasLikedByMe == wasLikedByMe));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(
|
||||
runtimeType, id, state, image, description, author, youtubeUrl, createdAt, updatedAt, title, totalLikes, totalViews, totalComments, wasLikedByMe);
|
||||
runtimeType,
|
||||
id,
|
||||
state,
|
||||
image,
|
||||
description,
|
||||
author,
|
||||
youtubeUrl,
|
||||
createdAt,
|
||||
updatedAt,
|
||||
title,
|
||||
totalLikes,
|
||||
totalViews,
|
||||
totalComments,
|
||||
wasLikedByMe);
|
||||
|
||||
/// Create a copy of FeedBlogPostModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$FeedBlogPostModelImplCopyWith<_$FeedBlogPostModelImpl> get copyWith => __$$FeedBlogPostModelImplCopyWithImpl<_$FeedBlogPostModelImpl>(this, _$identity);
|
||||
_$$FeedBlogPostModelImplCopyWith<_$FeedBlogPostModelImpl> get copyWith =>
|
||||
__$$FeedBlogPostModelImplCopyWithImpl<_$FeedBlogPostModelImpl>(
|
||||
this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
@@ -389,64 +407,54 @@ class _$FeedBlogPostModelImpl implements _FeedBlogPostModel {
|
||||
|
||||
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: "youtube_url") required final String youtubeUrl,
|
||||
@JsonKey(name: "created_at") required final DateTime createdAt,
|
||||
@JsonKey(name: "updated_at") 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;
|
||||
{required final int id,
|
||||
required final String state,
|
||||
required final String image,
|
||||
required final String description,
|
||||
required final Author author,
|
||||
@JsonKey(name: "youtube_url") required final String youtubeUrl,
|
||||
@JsonKey(name: "created_at") required final DateTime createdAt,
|
||||
@JsonKey(name: "updated_at") 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;
|
||||
factory _FeedBlogPostModel.fromJson(Map<String, dynamic> json) =
|
||||
_$FeedBlogPostModelImpl.fromJson;
|
||||
|
||||
@override
|
||||
int get id;
|
||||
|
||||
@override
|
||||
String get state;
|
||||
|
||||
@override
|
||||
String get image;
|
||||
|
||||
@override
|
||||
String get description;
|
||||
|
||||
@override
|
||||
Author get author;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "youtube_url")
|
||||
String get youtubeUrl;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "created_at")
|
||||
DateTime get createdAt;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "updated_at")
|
||||
DateTime get updatedAt;
|
||||
|
||||
@override
|
||||
String get title;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "total_likes")
|
||||
int get totalLikes;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "total_views")
|
||||
int get totalViews;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "total_comments")
|
||||
int get totalComments;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "was_liked_by_me")
|
||||
bool get wasLikedByMe;
|
||||
@@ -455,5 +463,6 @@ abstract class _FeedBlogPostModel implements FeedBlogPostModel {
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$FeedBlogPostModelImplCopyWith<_$FeedBlogPostModelImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
_$$FeedBlogPostModelImplCopyWith<_$FeedBlogPostModelImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -6,7 +6,9 @@ part of 'feed_blog_post_model.dart';
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_$FeedBlogPostModelImpl _$$FeedBlogPostModelImplFromJson(Map<String, dynamic> json) => _$FeedBlogPostModelImpl(
|
||||
_$FeedBlogPostModelImpl _$$FeedBlogPostModelImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$FeedBlogPostModelImpl(
|
||||
id: (json['id'] as num).toInt(),
|
||||
state: json['state'] as String,
|
||||
image: json['image'] as String,
|
||||
@@ -22,7 +24,9 @@ _$FeedBlogPostModelImpl _$$FeedBlogPostModelImplFromJson(Map<String, dynamic> js
|
||||
wasLikedByMe: json['was_liked_by_me'] as bool,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$FeedBlogPostModelImplToJson(_$FeedBlogPostModelImpl instance) => <String, dynamic>{
|
||||
Map<String, dynamic> _$$FeedBlogPostModelImplToJson(
|
||||
_$FeedBlogPostModelImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'id': instance.id,
|
||||
'state': instance.state,
|
||||
'image': instance.image,
|
||||
|
||||
@@ -14,15 +14,16 @@ 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');
|
||||
|
||||
FeedBlogPostSettingsModel _$FeedBlogPostSettingsModelFromJson(Map<String, dynamic> json) {
|
||||
FeedBlogPostSettingsModel _$FeedBlogPostSettingsModelFromJson(
|
||||
Map<String, dynamic> json) {
|
||||
return _FeedBlogPostSettingsModel.fromJson(json);
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
mixin _$FeedBlogPostSettingsModel {
|
||||
@JsonKey(name: 'data')
|
||||
List<FeedBlogPostModel> get feedBlogPostList => throw _privateConstructorUsedError;
|
||||
|
||||
List<FeedBlogPostModel> get feedBlogPostList =>
|
||||
throw _privateConstructorUsedError;
|
||||
Meta get meta => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this FeedBlogPostSettingsModel to a JSON map.
|
||||
@@ -31,27 +32,31 @@ mixin _$FeedBlogPostSettingsModel {
|
||||
/// Create a copy of FeedBlogPostSettingsModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$FeedBlogPostSettingsModelCopyWith<FeedBlogPostSettingsModel> get copyWith => throw _privateConstructorUsedError;
|
||||
$FeedBlogPostSettingsModelCopyWith<FeedBlogPostSettingsModel> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $FeedBlogPostSettingsModelCopyWith<$Res> {
|
||||
factory $FeedBlogPostSettingsModelCopyWith(FeedBlogPostSettingsModel value, $Res Function(FeedBlogPostSettingsModel) then) =
|
||||
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> implements $FeedBlogPostSettingsModelCopyWith<$Res> {
|
||||
class _$FeedBlogPostSettingsModelCopyWithImpl<$Res,
|
||||
$Val extends FeedBlogPostSettingsModel>
|
||||
implements $FeedBlogPostSettingsModelCopyWith<$Res> {
|
||||
_$FeedBlogPostSettingsModelCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
@@ -87,22 +92,30 @@ class _$FeedBlogPostSettingsModelCopyWithImpl<$Res, $Val extends FeedBlogPostSet
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$FeedBlogPostSettingsModelImplCopyWith<$Res> implements $FeedBlogPostSettingsModelCopyWith<$Res> {
|
||||
factory _$$FeedBlogPostSettingsModelImplCopyWith(_$FeedBlogPostSettingsModelImpl value, $Res Function(_$FeedBlogPostSettingsModelImpl) then) =
|
||||
abstract class _$$FeedBlogPostSettingsModelImplCopyWith<$Res>
|
||||
implements $FeedBlogPostSettingsModelCopyWith<$Res> {
|
||||
factory _$$FeedBlogPostSettingsModelImplCopyWith(
|
||||
_$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;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$FeedBlogPostSettingsModelImplCopyWithImpl<$Res> extends _$FeedBlogPostSettingsModelCopyWithImpl<$Res, _$FeedBlogPostSettingsModelImpl>
|
||||
class __$$FeedBlogPostSettingsModelImplCopyWithImpl<$Res>
|
||||
extends _$FeedBlogPostSettingsModelCopyWithImpl<$Res,
|
||||
_$FeedBlogPostSettingsModelImpl>
|
||||
implements _$$FeedBlogPostSettingsModelImplCopyWith<$Res> {
|
||||
__$$FeedBlogPostSettingsModelImplCopyWithImpl(_$FeedBlogPostSettingsModelImpl _value, $Res Function(_$FeedBlogPostSettingsModelImpl) _then)
|
||||
__$$FeedBlogPostSettingsModelImplCopyWithImpl(
|
||||
_$FeedBlogPostSettingsModelImpl _value,
|
||||
$Res Function(_$FeedBlogPostSettingsModelImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of FeedBlogPostSettingsModel
|
||||
@@ -129,17 +142,21 @@ class __$$FeedBlogPostSettingsModelImplCopyWithImpl<$Res> extends _$FeedBlogPost
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
class _$FeedBlogPostSettingsModelImpl implements _FeedBlogPostSettingsModel {
|
||||
const _$FeedBlogPostSettingsModelImpl({@JsonKey(name: 'data') required final List<FeedBlogPostModel> feedBlogPostList, required this.meta})
|
||||
const _$FeedBlogPostSettingsModelImpl(
|
||||
{@JsonKey(name: 'data')
|
||||
required final List<FeedBlogPostModel> feedBlogPostList,
|
||||
required this.meta})
|
||||
: _feedBlogPostList = feedBlogPostList;
|
||||
|
||||
factory _$FeedBlogPostSettingsModelImpl.fromJson(Map<String, dynamic> json) => _$$FeedBlogPostSettingsModelImplFromJson(json);
|
||||
factory _$FeedBlogPostSettingsModelImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$FeedBlogPostSettingsModelImplFromJson(json);
|
||||
|
||||
final List<FeedBlogPostModel> _feedBlogPostList;
|
||||
|
||||
@override
|
||||
@JsonKey(name: 'data')
|
||||
List<FeedBlogPostModel> get feedBlogPostList {
|
||||
if (_feedBlogPostList is EqualUnmodifiableListView) return _feedBlogPostList;
|
||||
if (_feedBlogPostList is EqualUnmodifiableListView)
|
||||
return _feedBlogPostList;
|
||||
// ignore: implicit_dynamic_type
|
||||
return EqualUnmodifiableListView(_feedBlogPostList);
|
||||
}
|
||||
@@ -157,21 +174,24 @@ 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.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$FeedBlogPostSettingsModelImplCopyWith<_$FeedBlogPostSettingsModelImpl> get copyWith =>
|
||||
__$$FeedBlogPostSettingsModelImplCopyWithImpl<_$FeedBlogPostSettingsModelImpl>(this, _$identity);
|
||||
_$$FeedBlogPostSettingsModelImplCopyWith<_$FeedBlogPostSettingsModelImpl>
|
||||
get copyWith => __$$FeedBlogPostSettingsModelImplCopyWithImpl<
|
||||
_$FeedBlogPostSettingsModelImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
@@ -182,15 +202,17 @@ class _$FeedBlogPostSettingsModelImpl implements _FeedBlogPostSettingsModel {
|
||||
}
|
||||
|
||||
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;
|
||||
factory _FeedBlogPostSettingsModel.fromJson(Map<String, dynamic> json) =
|
||||
_$FeedBlogPostSettingsModelImpl.fromJson;
|
||||
|
||||
@override
|
||||
@JsonKey(name: 'data')
|
||||
List<FeedBlogPostModel> get feedBlogPostList;
|
||||
|
||||
@override
|
||||
Meta get meta;
|
||||
|
||||
@@ -198,5 +220,6 @@ abstract class _FeedBlogPostSettingsModel implements FeedBlogPostSettingsModel {
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$FeedBlogPostSettingsModelImplCopyWith<_$FeedBlogPostSettingsModelImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
_$$FeedBlogPostSettingsModelImplCopyWith<_$FeedBlogPostSettingsModelImpl>
|
||||
get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -6,12 +6,18 @@ part of 'feed_blog_post_settings_model.dart';
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_$FeedBlogPostSettingsModelImpl _$$FeedBlogPostSettingsModelImplFromJson(Map<String, dynamic> json) => _$FeedBlogPostSettingsModelImpl(
|
||||
feedBlogPostList: (json['data'] as List<dynamic>).map((e) => FeedBlogPostModel.fromJson(e as Map<String, dynamic>)).toList(),
|
||||
_$FeedBlogPostSettingsModelImpl _$$FeedBlogPostSettingsModelImplFromJson(
|
||||
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>),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$FeedBlogPostSettingsModelImplToJson(_$FeedBlogPostSettingsModelImpl instance) => <String, dynamic>{
|
||||
Map<String, dynamic> _$$FeedBlogPostSettingsModelImplToJson(
|
||||
_$FeedBlogPostSettingsModelImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'data': instance.feedBlogPostList,
|
||||
'meta': instance.meta,
|
||||
};
|
||||
|
||||
@@ -21,44 +21,28 @@ Recipes _$RecipesFromJson(Map<String, dynamic> json) {
|
||||
/// @nodoc
|
||||
mixin _$Recipes {
|
||||
int get id => throw _privateConstructorUsedError;
|
||||
|
||||
String get image => throw _privateConstructorUsedError;
|
||||
|
||||
String get state => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: 'cooking_time')
|
||||
int get cookingTime => throw _privateConstructorUsedError;
|
||||
|
||||
List<Ingredient> get ingredients => throw _privateConstructorUsedError;
|
||||
|
||||
String get description => throw _privateConstructorUsedError;
|
||||
|
||||
List<Step> get steps => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: 'video_url')
|
||||
String get videoUrl => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: 'created_at')
|
||||
DateTime get createdAt => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: 'updated_at')
|
||||
DateTime get updatedAt => throw _privateConstructorUsedError;
|
||||
|
||||
String get title => throw _privateConstructorUsedError;
|
||||
|
||||
String get type => throw _privateConstructorUsedError;
|
||||
|
||||
String get slug => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: 'total_comments')
|
||||
int get commentsCount => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: 'total_likes')
|
||||
int get likesCount => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: 'total_views')
|
||||
int get viewsCount => throw _privateConstructorUsedError;
|
||||
|
||||
Author get author => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this Recipes to a JSON map.
|
||||
@@ -72,8 +56,8 @@ mixin _$Recipes {
|
||||
|
||||
/// @nodoc
|
||||
abstract class $RecipesCopyWith<$Res> {
|
||||
factory $RecipesCopyWith(Recipes value, $Res Function(Recipes) then) = _$RecipesCopyWithImpl<$Res, Recipes>;
|
||||
|
||||
factory $RecipesCopyWith(Recipes value, $Res Function(Recipes) then) =
|
||||
_$RecipesCopyWithImpl<$Res, Recipes>;
|
||||
@useResult
|
||||
$Res call(
|
||||
{int id,
|
||||
@@ -98,12 +82,12 @@ abstract class $RecipesCopyWith<$Res> {
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$RecipesCopyWithImpl<$Res, $Val extends Recipes> implements $RecipesCopyWith<$Res> {
|
||||
class _$RecipesCopyWithImpl<$Res, $Val extends Recipes>
|
||||
implements $RecipesCopyWith<$Res> {
|
||||
_$RecipesCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
@@ -215,8 +199,9 @@ class _$RecipesCopyWithImpl<$Res, $Val extends Recipes> implements $RecipesCopyW
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$RecipesImplCopyWith<$Res> implements $RecipesCopyWith<$Res> {
|
||||
factory _$$RecipesImplCopyWith(_$RecipesImpl value, $Res Function(_$RecipesImpl) then) = __$$RecipesImplCopyWithImpl<$Res>;
|
||||
|
||||
factory _$$RecipesImplCopyWith(
|
||||
_$RecipesImpl value, $Res Function(_$RecipesImpl) then) =
|
||||
__$$RecipesImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call(
|
||||
@@ -243,8 +228,12 @@ abstract class _$$RecipesImplCopyWith<$Res> implements $RecipesCopyWith<$Res> {
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$RecipesImplCopyWithImpl<$Res> extends _$RecipesCopyWithImpl<$Res, _$RecipesImpl> implements _$$RecipesImplCopyWith<$Res> {
|
||||
__$$RecipesImplCopyWithImpl(_$RecipesImpl _value, $Res Function(_$RecipesImpl) _then) : super(_value, _then);
|
||||
class __$$RecipesImplCopyWithImpl<$Res>
|
||||
extends _$RecipesCopyWithImpl<$Res, _$RecipesImpl>
|
||||
implements _$$RecipesImplCopyWith<$Res> {
|
||||
__$$RecipesImplCopyWithImpl(
|
||||
_$RecipesImpl _value, $Res Function(_$RecipesImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of Recipes
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -366,7 +355,8 @@ class _$RecipesImpl implements _Recipes {
|
||||
: _ingredients = ingredients,
|
||||
_steps = steps;
|
||||
|
||||
factory _$RecipesImpl.fromJson(Map<String, dynamic> json) => _$$RecipesImplFromJson(json);
|
||||
factory _$RecipesImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$RecipesImplFromJson(json);
|
||||
|
||||
@override
|
||||
final int id;
|
||||
@@ -378,7 +368,6 @@ class _$RecipesImpl implements _Recipes {
|
||||
@JsonKey(name: 'cooking_time')
|
||||
final int cookingTime;
|
||||
final List<Ingredient> _ingredients;
|
||||
|
||||
@override
|
||||
List<Ingredient> get ingredients {
|
||||
if (_ingredients is EqualUnmodifiableListView) return _ingredients;
|
||||
@@ -389,7 +378,6 @@ class _$RecipesImpl implements _Recipes {
|
||||
@override
|
||||
final String description;
|
||||
final List<Step> _steps;
|
||||
|
||||
@override
|
||||
List<Step> get steps {
|
||||
if (_steps is EqualUnmodifiableListView) return _steps;
|
||||
@@ -437,33 +425,60 @@ class _$RecipesImpl implements _Recipes {
|
||||
(identical(other.id, id) || other.id == id) &&
|
||||
(identical(other.image, image) || other.image == image) &&
|
||||
(identical(other.state, state) || other.state == state) &&
|
||||
(identical(other.cookingTime, cookingTime) || other.cookingTime == cookingTime) &&
|
||||
const DeepCollectionEquality().equals(other._ingredients, _ingredients) &&
|
||||
(identical(other.description, description) || other.description == description) &&
|
||||
(identical(other.cookingTime, cookingTime) ||
|
||||
other.cookingTime == cookingTime) &&
|
||||
const DeepCollectionEquality()
|
||||
.equals(other._ingredients, _ingredients) &&
|
||||
(identical(other.description, description) ||
|
||||
other.description == description) &&
|
||||
const DeepCollectionEquality().equals(other._steps, _steps) &&
|
||||
(identical(other.videoUrl, videoUrl) || other.videoUrl == videoUrl) &&
|
||||
(identical(other.createdAt, createdAt) || other.createdAt == createdAt) &&
|
||||
(identical(other.updatedAt, updatedAt) || other.updatedAt == updatedAt) &&
|
||||
(identical(other.videoUrl, videoUrl) ||
|
||||
other.videoUrl == videoUrl) &&
|
||||
(identical(other.createdAt, createdAt) ||
|
||||
other.createdAt == createdAt) &&
|
||||
(identical(other.updatedAt, updatedAt) ||
|
||||
other.updatedAt == updatedAt) &&
|
||||
(identical(other.title, title) || other.title == title) &&
|
||||
(identical(other.type, type) || other.type == type) &&
|
||||
(identical(other.slug, slug) || other.slug == slug) &&
|
||||
(identical(other.commentsCount, commentsCount) || other.commentsCount == commentsCount) &&
|
||||
(identical(other.likesCount, likesCount) || other.likesCount == likesCount) &&
|
||||
(identical(other.viewsCount, viewsCount) || other.viewsCount == viewsCount) &&
|
||||
(identical(other.commentsCount, commentsCount) ||
|
||||
other.commentsCount == commentsCount) &&
|
||||
(identical(other.likesCount, likesCount) ||
|
||||
other.likesCount == likesCount) &&
|
||||
(identical(other.viewsCount, viewsCount) ||
|
||||
other.viewsCount == viewsCount) &&
|
||||
(identical(other.author, author) || other.author == author));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType, id, image, state, cookingTime, const DeepCollectionEquality().hash(_ingredients), description,
|
||||
const DeepCollectionEquality().hash(_steps), videoUrl, createdAt, updatedAt, title, type, slug, commentsCount, likesCount, viewsCount, author);
|
||||
int get hashCode => Object.hash(
|
||||
runtimeType,
|
||||
id,
|
||||
image,
|
||||
state,
|
||||
cookingTime,
|
||||
const DeepCollectionEquality().hash(_ingredients),
|
||||
description,
|
||||
const DeepCollectionEquality().hash(_steps),
|
||||
videoUrl,
|
||||
createdAt,
|
||||
updatedAt,
|
||||
title,
|
||||
type,
|
||||
slug,
|
||||
commentsCount,
|
||||
likesCount,
|
||||
viewsCount,
|
||||
author);
|
||||
|
||||
/// Create a copy of Recipes
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$RecipesImplCopyWith<_$RecipesImpl> get copyWith => __$$RecipesImplCopyWithImpl<_$RecipesImpl>(this, _$identity);
|
||||
_$$RecipesImplCopyWith<_$RecipesImpl> get copyWith =>
|
||||
__$$RecipesImplCopyWithImpl<_$RecipesImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
@@ -497,59 +512,43 @@ abstract class _Recipes implements Recipes {
|
||||
|
||||
@override
|
||||
int get id;
|
||||
|
||||
@override
|
||||
String get image;
|
||||
|
||||
@override
|
||||
String get state;
|
||||
|
||||
@override
|
||||
@JsonKey(name: 'cooking_time')
|
||||
int get cookingTime;
|
||||
|
||||
@override
|
||||
List<Ingredient> get ingredients;
|
||||
|
||||
@override
|
||||
String get description;
|
||||
|
||||
@override
|
||||
List<Step> get steps;
|
||||
|
||||
@override
|
||||
@JsonKey(name: 'video_url')
|
||||
String get videoUrl;
|
||||
|
||||
@override
|
||||
@JsonKey(name: 'created_at')
|
||||
DateTime get createdAt;
|
||||
|
||||
@override
|
||||
@JsonKey(name: 'updated_at')
|
||||
DateTime get updatedAt;
|
||||
|
||||
@override
|
||||
String get title;
|
||||
|
||||
@override
|
||||
String get type;
|
||||
|
||||
@override
|
||||
String get slug;
|
||||
|
||||
@override
|
||||
@JsonKey(name: 'total_comments')
|
||||
int get commentsCount;
|
||||
|
||||
@override
|
||||
@JsonKey(name: 'total_likes')
|
||||
int get likesCount;
|
||||
|
||||
@override
|
||||
@JsonKey(name: 'total_views')
|
||||
int get viewsCount;
|
||||
|
||||
@override
|
||||
Author get author;
|
||||
|
||||
@@ -557,7 +556,8 @@ abstract class _Recipes implements Recipes {
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$RecipesImplCopyWith<_$RecipesImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
_$$RecipesImplCopyWith<_$RecipesImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
Ingredient _$IngredientFromJson(Map<String, dynamic> json) {
|
||||
@@ -567,9 +567,7 @@ Ingredient _$IngredientFromJson(Map<String, dynamic> json) {
|
||||
/// @nodoc
|
||||
mixin _$Ingredient {
|
||||
String get name => throw _privateConstructorUsedError;
|
||||
|
||||
String? get unit => throw _privateConstructorUsedError;
|
||||
|
||||
String get portion => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this Ingredient to a JSON map.
|
||||
@@ -578,24 +576,26 @@ mixin _$Ingredient {
|
||||
/// Create a copy of Ingredient
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$IngredientCopyWith<Ingredient> get copyWith => throw _privateConstructorUsedError;
|
||||
$IngredientCopyWith<Ingredient> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $IngredientCopyWith<$Res> {
|
||||
factory $IngredientCopyWith(Ingredient value, $Res Function(Ingredient) then) = _$IngredientCopyWithImpl<$Res, Ingredient>;
|
||||
|
||||
factory $IngredientCopyWith(
|
||||
Ingredient value, $Res Function(Ingredient) then) =
|
||||
_$IngredientCopyWithImpl<$Res, Ingredient>;
|
||||
@useResult
|
||||
$Res call({String name, String? unit, String portion});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$IngredientCopyWithImpl<$Res, $Val extends Ingredient> implements $IngredientCopyWith<$Res> {
|
||||
class _$IngredientCopyWithImpl<$Res, $Val extends Ingredient>
|
||||
implements $IngredientCopyWith<$Res> {
|
||||
_$IngredientCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
@@ -626,17 +626,23 @@ class _$IngredientCopyWithImpl<$Res, $Val extends Ingredient> implements $Ingred
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$IngredientImplCopyWith<$Res> implements $IngredientCopyWith<$Res> {
|
||||
factory _$$IngredientImplCopyWith(_$IngredientImpl value, $Res Function(_$IngredientImpl) then) = __$$IngredientImplCopyWithImpl<$Res>;
|
||||
|
||||
abstract class _$$IngredientImplCopyWith<$Res>
|
||||
implements $IngredientCopyWith<$Res> {
|
||||
factory _$$IngredientImplCopyWith(
|
||||
_$IngredientImpl value, $Res Function(_$IngredientImpl) then) =
|
||||
__$$IngredientImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call({String name, String? unit, String portion});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$IngredientImplCopyWithImpl<$Res> extends _$IngredientCopyWithImpl<$Res, _$IngredientImpl> implements _$$IngredientImplCopyWith<$Res> {
|
||||
__$$IngredientImplCopyWithImpl(_$IngredientImpl _value, $Res Function(_$IngredientImpl) _then) : super(_value, _then);
|
||||
class __$$IngredientImplCopyWithImpl<$Res>
|
||||
extends _$IngredientCopyWithImpl<$Res, _$IngredientImpl>
|
||||
implements _$$IngredientImplCopyWith<$Res> {
|
||||
__$$IngredientImplCopyWithImpl(
|
||||
_$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.
|
||||
@@ -667,9 +673,11 @@ class __$$IngredientImplCopyWithImpl<$Res> extends _$IngredientCopyWithImpl<$Res
|
||||
/// @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);
|
||||
factory _$IngredientImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$IngredientImplFromJson(json);
|
||||
|
||||
@override
|
||||
final String name;
|
||||
@@ -702,7 +710,8 @@ class _$IngredientImpl implements _Ingredient {
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$IngredientImplCopyWith<_$IngredientImpl> get copyWith => __$$IngredientImplCopyWithImpl<_$IngredientImpl>(this, _$identity);
|
||||
_$$IngredientImplCopyWith<_$IngredientImpl> get copyWith =>
|
||||
__$$IngredientImplCopyWithImpl<_$IngredientImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
@@ -713,16 +722,18 @@ class _$IngredientImpl implements _Ingredient {
|
||||
}
|
||||
|
||||
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;
|
||||
factory _Ingredient.fromJson(Map<String, dynamic> json) =
|
||||
_$IngredientImpl.fromJson;
|
||||
|
||||
@override
|
||||
String get name;
|
||||
|
||||
@override
|
||||
String? get unit;
|
||||
|
||||
@override
|
||||
String get portion;
|
||||
|
||||
@@ -730,7 +741,8 @@ abstract class _Ingredient implements Ingredient {
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$IngredientImplCopyWith<_$IngredientImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
_$$IngredientImplCopyWith<_$IngredientImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
Step _$StepFromJson(Map<String, dynamic> json) {
|
||||
@@ -740,7 +752,6 @@ Step _$StepFromJson(Map<String, dynamic> json) {
|
||||
/// @nodoc
|
||||
mixin _$Step {
|
||||
String get image => throw _privateConstructorUsedError;
|
||||
|
||||
String get description => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this Step to a JSON map.
|
||||
@@ -754,19 +765,19 @@ mixin _$Step {
|
||||
|
||||
/// @nodoc
|
||||
abstract class $StepCopyWith<$Res> {
|
||||
factory $StepCopyWith(Step value, $Res Function(Step) then) = _$StepCopyWithImpl<$Res, Step>;
|
||||
|
||||
factory $StepCopyWith(Step value, $Res Function(Step) then) =
|
||||
_$StepCopyWithImpl<$Res, Step>;
|
||||
@useResult
|
||||
$Res call({String image, String description});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$StepCopyWithImpl<$Res, $Val extends Step> implements $StepCopyWith<$Res> {
|
||||
class _$StepCopyWithImpl<$Res, $Val extends Step>
|
||||
implements $StepCopyWith<$Res> {
|
||||
_$StepCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
@@ -793,16 +804,20 @@ class _$StepCopyWithImpl<$Res, $Val extends Step> implements $StepCopyWith<$Res>
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$StepImplCopyWith<$Res> implements $StepCopyWith<$Res> {
|
||||
factory _$$StepImplCopyWith(_$StepImpl value, $Res Function(_$StepImpl) then) = __$$StepImplCopyWithImpl<$Res>;
|
||||
|
||||
factory _$$StepImplCopyWith(
|
||||
_$StepImpl value, $Res Function(_$StepImpl) then) =
|
||||
__$$StepImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call({String image, String description});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$StepImplCopyWithImpl<$Res> extends _$StepCopyWithImpl<$Res, _$StepImpl> implements _$$StepImplCopyWith<$Res> {
|
||||
__$$StepImplCopyWithImpl(_$StepImpl _value, $Res Function(_$StepImpl) _then) : super(_value, _then);
|
||||
class __$$StepImplCopyWithImpl<$Res>
|
||||
extends _$StepCopyWithImpl<$Res, _$StepImpl>
|
||||
implements _$$StepImplCopyWith<$Res> {
|
||||
__$$StepImplCopyWithImpl(_$StepImpl _value, $Res Function(_$StepImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of Step
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -830,7 +845,8 @@ class __$$StepImplCopyWithImpl<$Res> extends _$StepCopyWithImpl<$Res, _$StepImpl
|
||||
class _$StepImpl implements _Step {
|
||||
const _$StepImpl({required this.image, required this.description});
|
||||
|
||||
factory _$StepImpl.fromJson(Map<String, dynamic> json) => _$$StepImplFromJson(json);
|
||||
factory _$StepImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$StepImplFromJson(json);
|
||||
|
||||
@override
|
||||
final String image;
|
||||
@@ -848,7 +864,8 @@ class _$StepImpl implements _Step {
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$StepImpl &&
|
||||
(identical(other.image, image) || other.image == image) &&
|
||||
(identical(other.description, description) || other.description == description));
|
||||
(identical(other.description, description) ||
|
||||
other.description == description));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@@ -860,7 +877,8 @@ class _$StepImpl implements _Step {
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$StepImplCopyWith<_$StepImpl> get copyWith => __$$StepImplCopyWithImpl<_$StepImpl>(this, _$identity);
|
||||
_$$StepImplCopyWith<_$StepImpl> get copyWith =>
|
||||
__$$StepImplCopyWithImpl<_$StepImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
@@ -871,13 +889,14 @@ class _$StepImpl implements _Step {
|
||||
}
|
||||
|
||||
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;
|
||||
|
||||
@override
|
||||
String get image;
|
||||
|
||||
@override
|
||||
String get description;
|
||||
|
||||
@@ -885,5 +904,6 @@ abstract class _Step implements Step {
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$StepImplCopyWith<_$StepImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
_$$StepImplCopyWith<_$StepImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -6,14 +6,19 @@ part of 'recipes_model.dart';
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_$RecipesImpl _$$RecipesImplFromJson(Map<String, dynamic> json) => _$RecipesImpl(
|
||||
_$RecipesImpl _$$RecipesImplFromJson(Map<String, dynamic> json) =>
|
||||
_$RecipesImpl(
|
||||
id: (json['id'] as num).toInt(),
|
||||
image: json['image'] as String,
|
||||
state: json['state'] as String,
|
||||
cookingTime: (json['cooking_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),
|
||||
@@ -26,7 +31,8 @@ _$RecipesImpl _$$RecipesImplFromJson(Map<String, dynamic> json) => _$RecipesImpl
|
||||
author: Author.fromJson(json['author'] as Map<String, dynamic>),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$RecipesImplToJson(_$RecipesImpl instance) => <String, dynamic>{
|
||||
Map<String, dynamic> _$$RecipesImplToJson(_$RecipesImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'id': instance.id,
|
||||
'image': instance.image,
|
||||
'state': instance.state,
|
||||
@@ -46,13 +52,15 @@ Map<String, dynamic> _$$RecipesImplToJson(_$RecipesImpl instance) => <String, dy
|
||||
'author': instance.author,
|
||||
};
|
||||
|
||||
_$IngredientImpl _$$IngredientImplFromJson(Map<String, dynamic> json) => _$IngredientImpl(
|
||||
_$IngredientImpl _$$IngredientImplFromJson(Map<String, dynamic> json) =>
|
||||
_$IngredientImpl(
|
||||
name: json['name'] as String,
|
||||
unit: json['unit'] as String?,
|
||||
portion: json['portion'] as String,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$IngredientImplToJson(_$IngredientImpl instance) => <String, dynamic>{
|
||||
Map<String, dynamic> _$$IngredientImplToJson(_$IngredientImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'name': instance.name,
|
||||
'unit': instance.unit,
|
||||
'portion': instance.portion,
|
||||
@@ -63,7 +71,8 @@ _$StepImpl _$$StepImplFromJson(Map<String, dynamic> json) => _$StepImpl(
|
||||
description: json['description'] as String,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$StepImplToJson(_$StepImpl instance) => <String, dynamic>{
|
||||
Map<String, dynamic> _$$StepImplToJson(_$StepImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'image': instance.image,
|
||||
'description': instance.description,
|
||||
};
|
||||
|
||||
@@ -29,24 +29,26 @@ mixin _$RecipesPagination {
|
||||
/// Create a copy of RecipesPagination
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$RecipesPaginationCopyWith<RecipesPagination> get copyWith => throw _privateConstructorUsedError;
|
||||
$RecipesPaginationCopyWith<RecipesPagination> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $RecipesPaginationCopyWith<$Res> {
|
||||
factory $RecipesPaginationCopyWith(RecipesPagination value, $Res Function(RecipesPagination) then) = _$RecipesPaginationCopyWithImpl<$Res, RecipesPagination>;
|
||||
|
||||
factory $RecipesPaginationCopyWith(
|
||||
RecipesPagination value, $Res Function(RecipesPagination) then) =
|
||||
_$RecipesPaginationCopyWithImpl<$Res, RecipesPagination>;
|
||||
@useResult
|
||||
$Res call({@JsonKey(name: 'data') List<Recipes> recipesList});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$RecipesPaginationCopyWithImpl<$Res, $Val extends RecipesPagination> implements $RecipesPaginationCopyWith<$Res> {
|
||||
class _$RecipesPaginationCopyWithImpl<$Res, $Val extends RecipesPagination>
|
||||
implements $RecipesPaginationCopyWith<$Res> {
|
||||
_$RecipesPaginationCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
@@ -67,19 +69,23 @@ class _$RecipesPaginationCopyWithImpl<$Res, $Val extends RecipesPagination> impl
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$RecipesPaginationImplCopyWith<$Res> implements $RecipesPaginationCopyWith<$Res> {
|
||||
factory _$$RecipesPaginationImplCopyWith(_$RecipesPaginationImpl value, $Res Function(_$RecipesPaginationImpl) then) =
|
||||
abstract class _$$RecipesPaginationImplCopyWith<$Res>
|
||||
implements $RecipesPaginationCopyWith<$Res> {
|
||||
factory _$$RecipesPaginationImplCopyWith(_$RecipesPaginationImpl value,
|
||||
$Res Function(_$RecipesPaginationImpl) then) =
|
||||
__$$RecipesPaginationImplCopyWithImpl<$Res>;
|
||||
|
||||
@override
|
||||
@useResult
|
||||
$Res call({@JsonKey(name: 'data') List<Recipes> recipesList});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$RecipesPaginationImplCopyWithImpl<$Res> extends _$RecipesPaginationCopyWithImpl<$Res, _$RecipesPaginationImpl>
|
||||
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.
|
||||
@@ -100,12 +106,14 @@ class __$$RecipesPaginationImplCopyWithImpl<$Res> extends _$RecipesPaginationCop
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
class _$RecipesPaginationImpl implements _RecipesPagination {
|
||||
const _$RecipesPaginationImpl({@JsonKey(name: 'data') required final List<Recipes> recipesList}) : _recipesList = recipesList;
|
||||
const _$RecipesPaginationImpl(
|
||||
{@JsonKey(name: 'data') required final List<Recipes> recipesList})
|
||||
: _recipesList = recipesList;
|
||||
|
||||
factory _$RecipesPaginationImpl.fromJson(Map<String, dynamic> json) => _$$RecipesPaginationImplFromJson(json);
|
||||
factory _$RecipesPaginationImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$RecipesPaginationImplFromJson(json);
|
||||
|
||||
final List<Recipes> _recipesList;
|
||||
|
||||
@override
|
||||
@JsonKey(name: 'data')
|
||||
List<Recipes> get recipesList {
|
||||
@@ -122,19 +130,25 @@ class _$RecipesPaginationImpl implements _RecipesPagination {
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType && other is _$RecipesPaginationImpl && const DeepCollectionEquality().equals(other._recipesList, _recipesList));
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$RecipesPaginationImpl &&
|
||||
const DeepCollectionEquality()
|
||||
.equals(other._recipesList, _recipesList));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType, const DeepCollectionEquality().hash(_recipesList));
|
||||
int get hashCode => Object.hash(
|
||||
runtimeType, const DeepCollectionEquality().hash(_recipesList));
|
||||
|
||||
/// Create a copy of RecipesPagination
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$RecipesPaginationImplCopyWith<_$RecipesPaginationImpl> get copyWith => __$$RecipesPaginationImplCopyWithImpl<_$RecipesPaginationImpl>(this, _$identity);
|
||||
_$$RecipesPaginationImplCopyWith<_$RecipesPaginationImpl> get copyWith =>
|
||||
__$$RecipesPaginationImplCopyWithImpl<_$RecipesPaginationImpl>(
|
||||
this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
@@ -145,9 +159,12 @@ class _$RecipesPaginationImpl implements _RecipesPagination {
|
||||
}
|
||||
|
||||
abstract class _RecipesPagination implements RecipesPagination {
|
||||
const factory _RecipesPagination({@JsonKey(name: 'data') required final List<Recipes> recipesList}) = _$RecipesPaginationImpl;
|
||||
const factory _RecipesPagination(
|
||||
{@JsonKey(name: 'data') required final List<Recipes> recipesList}) =
|
||||
_$RecipesPaginationImpl;
|
||||
|
||||
factory _RecipesPagination.fromJson(Map<String, dynamic> json) = _$RecipesPaginationImpl.fromJson;
|
||||
factory _RecipesPagination.fromJson(Map<String, dynamic> json) =
|
||||
_$RecipesPaginationImpl.fromJson;
|
||||
|
||||
@override
|
||||
@JsonKey(name: 'data')
|
||||
@@ -157,5 +174,6 @@ abstract class _RecipesPagination implements RecipesPagination {
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$RecipesPaginationImplCopyWith<_$RecipesPaginationImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
_$$RecipesPaginationImplCopyWith<_$RecipesPaginationImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -6,10 +6,16 @@ part of 'recipes_pagination_model.dart';
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_$RecipesPaginationImpl _$$RecipesPaginationImplFromJson(Map<String, dynamic> json) => _$RecipesPaginationImpl(
|
||||
recipesList: (json['data'] as List<dynamic>).map((e) => Recipes.fromJson(e as Map<String, dynamic>)).toList(),
|
||||
_$RecipesPaginationImpl _$$RecipesPaginationImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$RecipesPaginationImpl(
|
||||
recipesList: (json['data'] as List<dynamic>)
|
||||
.map((e) => Recipes.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$RecipesPaginationImplToJson(_$RecipesPaginationImpl instance) => <String, dynamic>{
|
||||
Map<String, dynamic> _$$RecipesPaginationImplToJson(
|
||||
_$RecipesPaginationImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'data': instance.recipesList,
|
||||
};
|
||||
|
||||
@@ -19,13 +19,13 @@ class CommentsCubit extends Cubit<CommentsState> {
|
||||
try {
|
||||
switch (commentSourceType) {
|
||||
case CommentSourceType.blogPost:
|
||||
emit(CommentsState.loaded(comment: await feedRepository.getBlogPostComments(id)));
|
||||
emit(CommentsState.loaded(comment: await feedRepository.getBlogPostComments(id: id)));
|
||||
break;
|
||||
case CommentSourceType.diet:
|
||||
emit(CommentsState.loaded(comment: await feedRepository.getDietsComments(id)));
|
||||
emit(CommentsState.loaded(comment: await feedRepository.getDietsComments(id: id)));
|
||||
break;
|
||||
case CommentSourceType.recipe:
|
||||
emit(CommentsState.loaded(comment: await feedRepository.getRecipesComments(id)));
|
||||
emit(CommentsState.loaded(comment: await feedRepository.getRecipesComments(id: id)));
|
||||
break;
|
||||
}
|
||||
} catch (e) {
|
||||
|
||||
@@ -24,7 +24,6 @@ mixin _$CommentsState {
|
||||
required TResult Function(String errorMessage) error,
|
||||
}) =>
|
||||
throw _privateConstructorUsedError;
|
||||
|
||||
@optionalTypeArgs
|
||||
TResult? whenOrNull<TResult extends Object?>(
|
||||
TResult? Function()? $default, {
|
||||
@@ -71,16 +70,18 @@ mixin _$CommentsState {
|
||||
|
||||
/// @nodoc
|
||||
abstract class $CommentsStateCopyWith<$Res> {
|
||||
factory $CommentsStateCopyWith(CommentsState value, $Res Function(CommentsState) then) = _$CommentsStateCopyWithImpl<$Res, CommentsState>;
|
||||
factory $CommentsStateCopyWith(
|
||||
CommentsState value, $Res Function(CommentsState) then) =
|
||||
_$CommentsStateCopyWithImpl<$Res, CommentsState>;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$CommentsStateCopyWithImpl<$Res, $Val extends CommentsState> implements $CommentsStateCopyWith<$Res> {
|
||||
class _$CommentsStateCopyWithImpl<$Res, $Val extends CommentsState>
|
||||
implements $CommentsStateCopyWith<$Res> {
|
||||
_$CommentsStateCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
@@ -90,12 +91,18 @@ class _$CommentsStateCopyWithImpl<$Res, $Val extends CommentsState> implements $
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$CommentsStateImplCopyWith<$Res> {
|
||||
factory _$$CommentsStateImplCopyWith(_$CommentsStateImpl value, $Res Function(_$CommentsStateImpl) then) = __$$CommentsStateImplCopyWithImpl<$Res>;
|
||||
factory _$$CommentsStateImplCopyWith(
|
||||
_$CommentsStateImpl value, $Res Function(_$CommentsStateImpl) then) =
|
||||
__$$CommentsStateImplCopyWithImpl<$Res>;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$CommentsStateImplCopyWithImpl<$Res> extends _$CommentsStateCopyWithImpl<$Res, _$CommentsStateImpl> implements _$$CommentsStateImplCopyWith<$Res> {
|
||||
__$$CommentsStateImplCopyWithImpl(_$CommentsStateImpl _value, $Res Function(_$CommentsStateImpl) _then) : super(_value, _then);
|
||||
class __$$CommentsStateImplCopyWithImpl<$Res>
|
||||
extends _$CommentsStateCopyWithImpl<$Res, _$CommentsStateImpl>
|
||||
implements _$$CommentsStateImplCopyWith<$Res> {
|
||||
__$$CommentsStateImplCopyWithImpl(
|
||||
_$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.
|
||||
@@ -113,7 +120,8 @@ class _$CommentsStateImpl implements _CommentsState {
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType && other is _$CommentsStateImpl);
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType && other is _$CommentsStateImpl);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -200,14 +208,18 @@ abstract class _CommentsState implements CommentsState {
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$CommentsStateLoadingImplCopyWith<$Res> {
|
||||
factory _$$CommentsStateLoadingImplCopyWith(_$CommentsStateLoadingImpl value, $Res Function(_$CommentsStateLoadingImpl) then) =
|
||||
factory _$$CommentsStateLoadingImplCopyWith(_$CommentsStateLoadingImpl value,
|
||||
$Res Function(_$CommentsStateLoadingImpl) then) =
|
||||
__$$CommentsStateLoadingImplCopyWithImpl<$Res>;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$CommentsStateLoadingImplCopyWithImpl<$Res> extends _$CommentsStateCopyWithImpl<$Res, _$CommentsStateLoadingImpl>
|
||||
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.
|
||||
@@ -225,7 +237,9 @@ class _$CommentsStateLoadingImpl implements CommentsStateLoading {
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType && other is _$CommentsStateLoadingImpl);
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$CommentsStateLoadingImpl);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -312,9 +326,9 @@ abstract class CommentsStateLoading implements CommentsState {
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$CommentsStateLoadedImplCopyWith<$Res> {
|
||||
factory _$$CommentsStateLoadedImplCopyWith(_$CommentsStateLoadedImpl value, $Res Function(_$CommentsStateLoadedImpl) then) =
|
||||
factory _$$CommentsStateLoadedImplCopyWith(_$CommentsStateLoadedImpl value,
|
||||
$Res Function(_$CommentsStateLoadedImpl) then) =
|
||||
__$$CommentsStateLoadedImplCopyWithImpl<$Res>;
|
||||
|
||||
@useResult
|
||||
$Res call({CommentModel comment, int? replyId});
|
||||
|
||||
@@ -322,9 +336,12 @@ abstract class _$$CommentsStateLoadedImplCopyWith<$Res> {
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$CommentsStateLoadedImplCopyWithImpl<$Res> extends _$CommentsStateCopyWithImpl<$Res, _$CommentsStateLoadedImpl>
|
||||
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.
|
||||
@@ -390,7 +407,8 @@ class _$CommentsStateLoadedImpl implements CommentsStateLoaded {
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$CommentsStateLoadedImplCopyWith<_$CommentsStateLoadedImpl> get copyWith =>
|
||||
__$$CommentsStateLoadedImplCopyWithImpl<_$CommentsStateLoadedImpl>(this, _$identity);
|
||||
__$$CommentsStateLoadedImplCopyWithImpl<_$CommentsStateLoadedImpl>(
|
||||
this, _$identity);
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
@@ -468,31 +486,36 @@ 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;
|
||||
|
||||
/// Create a copy of CommentsState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$CommentsStateLoadedImplCopyWith<_$CommentsStateLoadedImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
_$$CommentsStateLoadedImplCopyWith<_$CommentsStateLoadedImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$CommentsStateErrorImplCopyWith<$Res> {
|
||||
factory _$$CommentsStateErrorImplCopyWith(_$CommentsStateErrorImpl value, $Res Function(_$CommentsStateErrorImpl) then) =
|
||||
factory _$$CommentsStateErrorImplCopyWith(_$CommentsStateErrorImpl value,
|
||||
$Res Function(_$CommentsStateErrorImpl) then) =
|
||||
__$$CommentsStateErrorImplCopyWithImpl<$Res>;
|
||||
|
||||
@useResult
|
||||
$Res call({String errorMessage});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$CommentsStateErrorImplCopyWithImpl<$Res> extends _$CommentsStateCopyWithImpl<$Res, _$CommentsStateErrorImpl>
|
||||
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.
|
||||
@@ -528,7 +551,8 @@ class _$CommentsStateErrorImpl implements CommentsStateError {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$CommentsStateErrorImpl &&
|
||||
(identical(other.errorMessage, errorMessage) || other.errorMessage == errorMessage));
|
||||
(identical(other.errorMessage, errorMessage) ||
|
||||
other.errorMessage == errorMessage));
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -540,7 +564,8 @@ class _$CommentsStateErrorImpl implements CommentsStateError {
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$CommentsStateErrorImplCopyWith<_$CommentsStateErrorImpl> get copyWith =>
|
||||
__$$CommentsStateErrorImplCopyWithImpl<_$CommentsStateErrorImpl>(this, _$identity);
|
||||
__$$CommentsStateErrorImplCopyWithImpl<_$CommentsStateErrorImpl>(
|
||||
this, _$identity);
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
@@ -618,12 +643,14 @@ class _$CommentsStateErrorImpl implements CommentsStateError {
|
||||
}
|
||||
|
||||
abstract class CommentsStateError implements CommentsState {
|
||||
const factory CommentsStateError({required final String errorMessage}) = _$CommentsStateErrorImpl;
|
||||
const factory CommentsStateError({required final String errorMessage}) =
|
||||
_$CommentsStateErrorImpl;
|
||||
|
||||
String get errorMessage;
|
||||
|
||||
/// Create a copy of CommentsState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$CommentsStateErrorImplCopyWith<_$CommentsStateErrorImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
_$$CommentsStateErrorImplCopyWith<_$CommentsStateErrorImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -24,7 +24,6 @@ mixin _$DietsState {
|
||||
required TResult Function(String errorMessage) error,
|
||||
}) =>
|
||||
throw _privateConstructorUsedError;
|
||||
|
||||
@optionalTypeArgs
|
||||
TResult? whenOrNull<TResult extends Object?>(
|
||||
TResult? Function()? $default, {
|
||||
@@ -71,16 +70,18 @@ mixin _$DietsState {
|
||||
|
||||
/// @nodoc
|
||||
abstract class $DietsStateCopyWith<$Res> {
|
||||
factory $DietsStateCopyWith(DietsState value, $Res Function(DietsState) then) = _$DietsStateCopyWithImpl<$Res, DietsState>;
|
||||
factory $DietsStateCopyWith(
|
||||
DietsState value, $Res Function(DietsState) then) =
|
||||
_$DietsStateCopyWithImpl<$Res, DietsState>;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$DietsStateCopyWithImpl<$Res, $Val extends DietsState> implements $DietsStateCopyWith<$Res> {
|
||||
class _$DietsStateCopyWithImpl<$Res, $Val extends DietsState>
|
||||
implements $DietsStateCopyWith<$Res> {
|
||||
_$DietsStateCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
@@ -90,12 +91,18 @@ class _$DietsStateCopyWithImpl<$Res, $Val extends DietsState> implements $DietsS
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$DietsStateImplCopyWith<$Res> {
|
||||
factory _$$DietsStateImplCopyWith(_$DietsStateImpl value, $Res Function(_$DietsStateImpl) then) = __$$DietsStateImplCopyWithImpl<$Res>;
|
||||
factory _$$DietsStateImplCopyWith(
|
||||
_$DietsStateImpl value, $Res Function(_$DietsStateImpl) then) =
|
||||
__$$DietsStateImplCopyWithImpl<$Res>;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$DietsStateImplCopyWithImpl<$Res> extends _$DietsStateCopyWithImpl<$Res, _$DietsStateImpl> implements _$$DietsStateImplCopyWith<$Res> {
|
||||
__$$DietsStateImplCopyWithImpl(_$DietsStateImpl _value, $Res Function(_$DietsStateImpl) _then) : super(_value, _then);
|
||||
class __$$DietsStateImplCopyWithImpl<$Res>
|
||||
extends _$DietsStateCopyWithImpl<$Res, _$DietsStateImpl>
|
||||
implements _$$DietsStateImplCopyWith<$Res> {
|
||||
__$$DietsStateImplCopyWithImpl(
|
||||
_$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.
|
||||
@@ -113,7 +120,8 @@ class _$DietsStateImpl implements _DietsState {
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType && other is _$DietsStateImpl);
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType && other is _$DietsStateImpl);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -200,14 +208,18 @@ abstract class _DietsState implements DietsState {
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$DietsStateLoadingImplCopyWith<$Res> {
|
||||
factory _$$DietsStateLoadingImplCopyWith(_$DietsStateLoadingImpl value, $Res Function(_$DietsStateLoadingImpl) then) =
|
||||
factory _$$DietsStateLoadingImplCopyWith(_$DietsStateLoadingImpl value,
|
||||
$Res Function(_$DietsStateLoadingImpl) then) =
|
||||
__$$DietsStateLoadingImplCopyWithImpl<$Res>;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$DietsStateLoadingImplCopyWithImpl<$Res> extends _$DietsStateCopyWithImpl<$Res, _$DietsStateLoadingImpl>
|
||||
class __$$DietsStateLoadingImplCopyWithImpl<$Res>
|
||||
extends _$DietsStateCopyWithImpl<$Res, _$DietsStateLoadingImpl>
|
||||
implements _$$DietsStateLoadingImplCopyWith<$Res> {
|
||||
__$$DietsStateLoadingImplCopyWithImpl(_$DietsStateLoadingImpl _value, $Res Function(_$DietsStateLoadingImpl) _then) : super(_value, _then);
|
||||
__$$DietsStateLoadingImplCopyWithImpl(_$DietsStateLoadingImpl _value,
|
||||
$Res Function(_$DietsStateLoadingImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of DietsState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -225,7 +237,8 @@ class _$DietsStateLoadingImpl implements DietsStateLoading {
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType && other is _$DietsStateLoadingImpl);
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType && other is _$DietsStateLoadingImpl);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -312,9 +325,9 @@ abstract class DietsStateLoading implements DietsState {
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$DietsStateLoadedImplCopyWith<$Res> {
|
||||
factory _$$DietsStateLoadedImplCopyWith(_$DietsStateLoadedImpl value, $Res Function(_$DietsStateLoadedImpl) then) =
|
||||
factory _$$DietsStateLoadedImplCopyWith(_$DietsStateLoadedImpl value,
|
||||
$Res Function(_$DietsStateLoadedImpl) then) =
|
||||
__$$DietsStateLoadedImplCopyWithImpl<$Res>;
|
||||
|
||||
@useResult
|
||||
$Res call({DietsPagination diets});
|
||||
|
||||
@@ -322,9 +335,12 @@ abstract class _$$DietsStateLoadedImplCopyWith<$Res> {
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$DietsStateLoadedImplCopyWithImpl<$Res> extends _$DietsStateCopyWithImpl<$Res, _$DietsStateLoadedImpl>
|
||||
class __$$DietsStateLoadedImplCopyWithImpl<$Res>
|
||||
extends _$DietsStateCopyWithImpl<$Res, _$DietsStateLoadedImpl>
|
||||
implements _$$DietsStateLoadedImplCopyWith<$Res> {
|
||||
__$$DietsStateLoadedImplCopyWithImpl(_$DietsStateLoadedImpl _value, $Res Function(_$DietsStateLoadedImpl) _then) : super(_value, _then);
|
||||
__$$DietsStateLoadedImplCopyWithImpl(_$DietsStateLoadedImpl _value,
|
||||
$Res Function(_$DietsStateLoadedImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of DietsState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -368,7 +384,9 @@ class _$DietsStateLoadedImpl implements DietsStateLoaded {
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType && other is _$DietsStateLoadedImpl && (identical(other.diets, diets) || other.diets == diets));
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$DietsStateLoadedImpl &&
|
||||
(identical(other.diets, diets) || other.diets == diets));
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -379,7 +397,9 @@ class _$DietsStateLoadedImpl implements DietsStateLoaded {
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$DietsStateLoadedImplCopyWith<_$DietsStateLoadedImpl> get copyWith => __$$DietsStateLoadedImplCopyWithImpl<_$DietsStateLoadedImpl>(this, _$identity);
|
||||
_$$DietsStateLoadedImplCopyWith<_$DietsStateLoadedImpl> get copyWith =>
|
||||
__$$DietsStateLoadedImplCopyWithImpl<_$DietsStateLoadedImpl>(
|
||||
this, _$identity);
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
@@ -457,27 +477,34 @@ class _$DietsStateLoadedImpl implements DietsStateLoaded {
|
||||
}
|
||||
|
||||
abstract class DietsStateLoaded implements DietsState {
|
||||
const factory DietsStateLoaded({required final DietsPagination diets}) = _$DietsStateLoadedImpl;
|
||||
const factory DietsStateLoaded({required final DietsPagination diets}) =
|
||||
_$DietsStateLoadedImpl;
|
||||
|
||||
DietsPagination get diets;
|
||||
|
||||
/// Create a copy of DietsState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$DietsStateLoadedImplCopyWith<_$DietsStateLoadedImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
_$$DietsStateLoadedImplCopyWith<_$DietsStateLoadedImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$DietsStateErrorImplCopyWith<$Res> {
|
||||
factory _$$DietsStateErrorImplCopyWith(_$DietsStateErrorImpl value, $Res Function(_$DietsStateErrorImpl) then) = __$$DietsStateErrorImplCopyWithImpl<$Res>;
|
||||
|
||||
factory _$$DietsStateErrorImplCopyWith(_$DietsStateErrorImpl value,
|
||||
$Res Function(_$DietsStateErrorImpl) then) =
|
||||
__$$DietsStateErrorImplCopyWithImpl<$Res>;
|
||||
@useResult
|
||||
$Res call({String errorMessage});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$DietsStateErrorImplCopyWithImpl<$Res> extends _$DietsStateCopyWithImpl<$Res, _$DietsStateErrorImpl> implements _$$DietsStateErrorImplCopyWith<$Res> {
|
||||
__$$DietsStateErrorImplCopyWithImpl(_$DietsStateErrorImpl _value, $Res Function(_$DietsStateErrorImpl) _then) : super(_value, _then);
|
||||
class __$$DietsStateErrorImplCopyWithImpl<$Res>
|
||||
extends _$DietsStateCopyWithImpl<$Res, _$DietsStateErrorImpl>
|
||||
implements _$$DietsStateErrorImplCopyWith<$Res> {
|
||||
__$$DietsStateErrorImplCopyWithImpl(
|
||||
_$DietsStateErrorImpl _value, $Res Function(_$DietsStateErrorImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of DietsState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -513,7 +540,8 @@ class _$DietsStateErrorImpl implements DietsStateError {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$DietsStateErrorImpl &&
|
||||
(identical(other.errorMessage, errorMessage) || other.errorMessage == errorMessage));
|
||||
(identical(other.errorMessage, errorMessage) ||
|
||||
other.errorMessage == errorMessage));
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -524,7 +552,9 @@ class _$DietsStateErrorImpl implements DietsStateError {
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$DietsStateErrorImplCopyWith<_$DietsStateErrorImpl> get copyWith => __$$DietsStateErrorImplCopyWithImpl<_$DietsStateErrorImpl>(this, _$identity);
|
||||
_$$DietsStateErrorImplCopyWith<_$DietsStateErrorImpl> get copyWith =>
|
||||
__$$DietsStateErrorImplCopyWithImpl<_$DietsStateErrorImpl>(
|
||||
this, _$identity);
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
@@ -602,12 +632,14 @@ class _$DietsStateErrorImpl implements DietsStateError {
|
||||
}
|
||||
|
||||
abstract class DietsStateError implements DietsState {
|
||||
const factory DietsStateError({required final String errorMessage}) = _$DietsStateErrorImpl;
|
||||
const factory DietsStateError({required final String errorMessage}) =
|
||||
_$DietsStateErrorImpl;
|
||||
|
||||
String get errorMessage;
|
||||
|
||||
/// Create a copy of DietsState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$DietsStateErrorImplCopyWith<_$DietsStateErrorImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
_$$DietsStateErrorImplCopyWith<_$DietsStateErrorImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -7,12 +7,16 @@ class FeedCubit extends Cubit<FeedState> {
|
||||
int currentPage = 1;
|
||||
late int lastPage;
|
||||
bool isLoading = false;
|
||||
String? _query;
|
||||
|
||||
FeedCubit({required this.feedRepository}) : super(const FeedState.loading());
|
||||
|
||||
loadFeedBlogPostList() async {
|
||||
loadFeedBlogPostList({
|
||||
String? query,
|
||||
}) async {
|
||||
try {
|
||||
final feedBlogPosts = await feedRepository.getFeedBlogPosts();
|
||||
_query = query;
|
||||
final feedBlogPosts = await feedRepository.getFeedBlogPosts(query: query);
|
||||
lastPage = feedBlogPosts.meta.lastPage;
|
||||
emit(
|
||||
FeedState.loaded(
|
||||
@@ -34,7 +38,10 @@ class FeedCubit extends Cubit<FeedState> {
|
||||
try {
|
||||
if (currentPage < lastPage) {
|
||||
currentPage++;
|
||||
final feedBlogPosts = await feedRepository.getFeedBlogPosts(page: currentPage);
|
||||
final feedBlogPosts = await feedRepository.getFeedBlogPosts(
|
||||
page: currentPage,
|
||||
query: _query,
|
||||
);
|
||||
isLoading = false;
|
||||
emit(
|
||||
FeedState.loaded(
|
||||
@@ -52,7 +59,7 @@ class FeedCubit extends Cubit<FeedState> {
|
||||
}
|
||||
}
|
||||
|
||||
likePost(int id) async => await feedRepository.likeBlogPost(id);
|
||||
likePost(int id) async => await feedRepository.likeBlogPost(id: id);
|
||||
|
||||
unlikedPost(int id) async => await feedRepository.unlikedBlogPost(id);
|
||||
unlikedPost(int id) async => await feedRepository.unlikedBlogPost(id: id);
|
||||
}
|
||||
|
||||
@@ -20,16 +20,18 @@ mixin _$FeedState {
|
||||
TResult when<TResult extends Object?>(
|
||||
TResult Function() $default, {
|
||||
required TResult Function() loading,
|
||||
required TResult Function(List<FeedBlogPostModel> feedBlogPostList, bool isLoading) loaded,
|
||||
required TResult Function(
|
||||
List<FeedBlogPostModel> feedBlogPostList, bool isLoading)
|
||||
loaded,
|
||||
required TResult Function(String errorMessage) error,
|
||||
}) =>
|
||||
throw _privateConstructorUsedError;
|
||||
|
||||
@optionalTypeArgs
|
||||
TResult? whenOrNull<TResult extends Object?>(
|
||||
TResult? Function()? $default, {
|
||||
TResult? Function()? loading,
|
||||
TResult? Function(List<FeedBlogPostModel> feedBlogPostList, bool isLoading)? loaded,
|
||||
TResult? Function(List<FeedBlogPostModel> feedBlogPostList, bool isLoading)?
|
||||
loaded,
|
||||
TResult? Function(String errorMessage)? error,
|
||||
}) =>
|
||||
throw _privateConstructorUsedError;
|
||||
@@ -37,7 +39,8 @@ mixin _$FeedState {
|
||||
TResult maybeWhen<TResult extends Object?>(
|
||||
TResult Function()? $default, {
|
||||
TResult Function()? loading,
|
||||
TResult Function(List<FeedBlogPostModel> feedBlogPostList, bool isLoading)? loaded,
|
||||
TResult Function(List<FeedBlogPostModel> feedBlogPostList, bool isLoading)?
|
||||
loaded,
|
||||
TResult Function(String errorMessage)? error,
|
||||
required TResult orElse(),
|
||||
}) =>
|
||||
@@ -71,16 +74,17 @@ mixin _$FeedState {
|
||||
|
||||
/// @nodoc
|
||||
abstract class $FeedStateCopyWith<$Res> {
|
||||
factory $FeedStateCopyWith(FeedState value, $Res Function(FeedState) then) = _$FeedStateCopyWithImpl<$Res, FeedState>;
|
||||
factory $FeedStateCopyWith(FeedState value, $Res Function(FeedState) then) =
|
||||
_$FeedStateCopyWithImpl<$Res, FeedState>;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$FeedStateCopyWithImpl<$Res, $Val extends FeedState> implements $FeedStateCopyWith<$Res> {
|
||||
class _$FeedStateCopyWithImpl<$Res, $Val extends FeedState>
|
||||
implements $FeedStateCopyWith<$Res> {
|
||||
_$FeedStateCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
@@ -90,12 +94,18 @@ class _$FeedStateCopyWithImpl<$Res, $Val extends FeedState> implements $FeedStat
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$FeedStateImplCopyWith<$Res> {
|
||||
factory _$$FeedStateImplCopyWith(_$FeedStateImpl value, $Res Function(_$FeedStateImpl) then) = __$$FeedStateImplCopyWithImpl<$Res>;
|
||||
factory _$$FeedStateImplCopyWith(
|
||||
_$FeedStateImpl value, $Res Function(_$FeedStateImpl) then) =
|
||||
__$$FeedStateImplCopyWithImpl<$Res>;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$FeedStateImplCopyWithImpl<$Res> extends _$FeedStateCopyWithImpl<$Res, _$FeedStateImpl> implements _$$FeedStateImplCopyWith<$Res> {
|
||||
__$$FeedStateImplCopyWithImpl(_$FeedStateImpl _value, $Res Function(_$FeedStateImpl) _then) : super(_value, _then);
|
||||
class __$$FeedStateImplCopyWithImpl<$Res>
|
||||
extends _$FeedStateCopyWithImpl<$Res, _$FeedStateImpl>
|
||||
implements _$$FeedStateImplCopyWith<$Res> {
|
||||
__$$FeedStateImplCopyWithImpl(
|
||||
_$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.
|
||||
@@ -113,7 +123,8 @@ class _$FeedStateImpl implements _FeedState {
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType && other is _$FeedStateImpl);
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType && other is _$FeedStateImpl);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -124,7 +135,9 @@ class _$FeedStateImpl implements _FeedState {
|
||||
TResult when<TResult extends Object?>(
|
||||
TResult Function() $default, {
|
||||
required TResult Function() loading,
|
||||
required TResult Function(List<FeedBlogPostModel> feedBlogPostList, bool isLoading) loaded,
|
||||
required TResult Function(
|
||||
List<FeedBlogPostModel> feedBlogPostList, bool isLoading)
|
||||
loaded,
|
||||
required TResult Function(String errorMessage) error,
|
||||
}) {
|
||||
return $default();
|
||||
@@ -135,7 +148,8 @@ class _$FeedStateImpl implements _FeedState {
|
||||
TResult? whenOrNull<TResult extends Object?>(
|
||||
TResult? Function()? $default, {
|
||||
TResult? Function()? loading,
|
||||
TResult? Function(List<FeedBlogPostModel> feedBlogPostList, bool isLoading)? loaded,
|
||||
TResult? Function(List<FeedBlogPostModel> feedBlogPostList, bool isLoading)?
|
||||
loaded,
|
||||
TResult? Function(String errorMessage)? error,
|
||||
}) {
|
||||
return $default?.call();
|
||||
@@ -146,7 +160,8 @@ class _$FeedStateImpl implements _FeedState {
|
||||
TResult maybeWhen<TResult extends Object?>(
|
||||
TResult Function()? $default, {
|
||||
TResult Function()? loading,
|
||||
TResult Function(List<FeedBlogPostModel> feedBlogPostList, bool isLoading)? loaded,
|
||||
TResult Function(List<FeedBlogPostModel> feedBlogPostList, bool isLoading)?
|
||||
loaded,
|
||||
TResult Function(String errorMessage)? error,
|
||||
required TResult orElse(),
|
||||
}) {
|
||||
@@ -200,14 +215,18 @@ abstract class _FeedState implements FeedState {
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$FeedStateLoadingImplCopyWith<$Res> {
|
||||
factory _$$FeedStateLoadingImplCopyWith(_$FeedStateLoadingImpl value, $Res Function(_$FeedStateLoadingImpl) then) =
|
||||
factory _$$FeedStateLoadingImplCopyWith(_$FeedStateLoadingImpl value,
|
||||
$Res Function(_$FeedStateLoadingImpl) then) =
|
||||
__$$FeedStateLoadingImplCopyWithImpl<$Res>;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$FeedStateLoadingImplCopyWithImpl<$Res> extends _$FeedStateCopyWithImpl<$Res, _$FeedStateLoadingImpl>
|
||||
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.
|
||||
@@ -225,7 +244,8 @@ class _$FeedStateLoadingImpl implements FeedStateLoading {
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType && other is _$FeedStateLoadingImpl);
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType && other is _$FeedStateLoadingImpl);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -236,7 +256,9 @@ class _$FeedStateLoadingImpl implements FeedStateLoading {
|
||||
TResult when<TResult extends Object?>(
|
||||
TResult Function() $default, {
|
||||
required TResult Function() loading,
|
||||
required TResult Function(List<FeedBlogPostModel> feedBlogPostList, bool isLoading) loaded,
|
||||
required TResult Function(
|
||||
List<FeedBlogPostModel> feedBlogPostList, bool isLoading)
|
||||
loaded,
|
||||
required TResult Function(String errorMessage) error,
|
||||
}) {
|
||||
return loading();
|
||||
@@ -247,7 +269,8 @@ class _$FeedStateLoadingImpl implements FeedStateLoading {
|
||||
TResult? whenOrNull<TResult extends Object?>(
|
||||
TResult? Function()? $default, {
|
||||
TResult? Function()? loading,
|
||||
TResult? Function(List<FeedBlogPostModel> feedBlogPostList, bool isLoading)? loaded,
|
||||
TResult? Function(List<FeedBlogPostModel> feedBlogPostList, bool isLoading)?
|
||||
loaded,
|
||||
TResult? Function(String errorMessage)? error,
|
||||
}) {
|
||||
return loading?.call();
|
||||
@@ -258,7 +281,8 @@ class _$FeedStateLoadingImpl implements FeedStateLoading {
|
||||
TResult maybeWhen<TResult extends Object?>(
|
||||
TResult Function()? $default, {
|
||||
TResult Function()? loading,
|
||||
TResult Function(List<FeedBlogPostModel> feedBlogPostList, bool isLoading)? loaded,
|
||||
TResult Function(List<FeedBlogPostModel> feedBlogPostList, bool isLoading)?
|
||||
loaded,
|
||||
TResult Function(String errorMessage)? error,
|
||||
required TResult orElse(),
|
||||
}) {
|
||||
@@ -312,15 +336,20 @@ 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});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$FeedStateLoadedImplCopyWithImpl<$Res> extends _$FeedStateCopyWithImpl<$Res, _$FeedStateLoadedImpl> implements _$$FeedStateLoadedImplCopyWith<$Res> {
|
||||
__$$FeedStateLoadedImplCopyWithImpl(_$FeedStateLoadedImpl _value, $Res Function(_$FeedStateLoadedImpl) _then) : super(_value, _then);
|
||||
class __$$FeedStateLoadedImplCopyWithImpl<$Res>
|
||||
extends _$FeedStateCopyWithImpl<$Res, _$FeedStateLoadedImpl>
|
||||
implements _$$FeedStateLoadedImplCopyWith<$Res> {
|
||||
__$$FeedStateLoadedImplCopyWithImpl(
|
||||
_$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.
|
||||
@@ -346,13 +375,16 @@ class __$$FeedStateLoadedImplCopyWithImpl<$Res> extends _$FeedStateCopyWithImpl<
|
||||
/// @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
|
||||
List<FeedBlogPostModel> get feedBlogPostList {
|
||||
if (_feedBlogPostList is EqualUnmodifiableListView) return _feedBlogPostList;
|
||||
if (_feedBlogPostList is EqualUnmodifiableListView)
|
||||
return _feedBlogPostList;
|
||||
// ignore: implicit_dynamic_type
|
||||
return EqualUnmodifiableListView(_feedBlogPostList);
|
||||
}
|
||||
@@ -370,26 +402,33 @@ class _$FeedStateLoadedImpl implements FeedStateLoaded {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$FeedStateLoadedImpl &&
|
||||
const DeepCollectionEquality().equals(other._feedBlogPostList, _feedBlogPostList) &&
|
||||
(identical(other.isLoading, isLoading) || other.isLoading == isLoading));
|
||||
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.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$FeedStateLoadedImplCopyWith<_$FeedStateLoadedImpl> get copyWith => __$$FeedStateLoadedImplCopyWithImpl<_$FeedStateLoadedImpl>(this, _$identity);
|
||||
_$$FeedStateLoadedImplCopyWith<_$FeedStateLoadedImpl> get copyWith =>
|
||||
__$$FeedStateLoadedImplCopyWithImpl<_$FeedStateLoadedImpl>(
|
||||
this, _$identity);
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
TResult when<TResult extends Object?>(
|
||||
TResult Function() $default, {
|
||||
required TResult Function() loading,
|
||||
required TResult Function(List<FeedBlogPostModel> feedBlogPostList, bool isLoading) loaded,
|
||||
required TResult Function(
|
||||
List<FeedBlogPostModel> feedBlogPostList, bool isLoading)
|
||||
loaded,
|
||||
required TResult Function(String errorMessage) error,
|
||||
}) {
|
||||
return loaded(feedBlogPostList, isLoading);
|
||||
@@ -400,7 +439,8 @@ class _$FeedStateLoadedImpl implements FeedStateLoaded {
|
||||
TResult? whenOrNull<TResult extends Object?>(
|
||||
TResult? Function()? $default, {
|
||||
TResult? Function()? loading,
|
||||
TResult? Function(List<FeedBlogPostModel> feedBlogPostList, bool isLoading)? loaded,
|
||||
TResult? Function(List<FeedBlogPostModel> feedBlogPostList, bool isLoading)?
|
||||
loaded,
|
||||
TResult? Function(String errorMessage)? error,
|
||||
}) {
|
||||
return loaded?.call(feedBlogPostList, isLoading);
|
||||
@@ -411,7 +451,8 @@ class _$FeedStateLoadedImpl implements FeedStateLoaded {
|
||||
TResult maybeWhen<TResult extends Object?>(
|
||||
TResult Function()? $default, {
|
||||
TResult Function()? loading,
|
||||
TResult Function(List<FeedBlogPostModel> feedBlogPostList, bool isLoading)? loaded,
|
||||
TResult Function(List<FeedBlogPostModel> feedBlogPostList, bool isLoading)?
|
||||
loaded,
|
||||
TResult Function(String errorMessage)? error,
|
||||
required TResult orElse(),
|
||||
}) {
|
||||
@@ -460,29 +501,36 @@ 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;
|
||||
|
||||
/// Create a copy of FeedState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$FeedStateLoadedImplCopyWith<_$FeedStateLoadedImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
_$$FeedStateLoadedImplCopyWith<_$FeedStateLoadedImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @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});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$FeedStateErrorImplCopyWithImpl<$Res> extends _$FeedStateCopyWithImpl<$Res, _$FeedStateErrorImpl> implements _$$FeedStateErrorImplCopyWith<$Res> {
|
||||
__$$FeedStateErrorImplCopyWithImpl(_$FeedStateErrorImpl _value, $Res Function(_$FeedStateErrorImpl) _then) : super(_value, _then);
|
||||
class __$$FeedStateErrorImplCopyWithImpl<$Res>
|
||||
extends _$FeedStateCopyWithImpl<$Res, _$FeedStateErrorImpl>
|
||||
implements _$$FeedStateErrorImplCopyWith<$Res> {
|
||||
__$$FeedStateErrorImplCopyWithImpl(
|
||||
_$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.
|
||||
@@ -518,7 +566,8 @@ class _$FeedStateErrorImpl implements FeedStateError {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$FeedStateErrorImpl &&
|
||||
(identical(other.errorMessage, errorMessage) || other.errorMessage == errorMessage));
|
||||
(identical(other.errorMessage, errorMessage) ||
|
||||
other.errorMessage == errorMessage));
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -529,14 +578,18 @@ class _$FeedStateErrorImpl implements FeedStateError {
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$FeedStateErrorImplCopyWith<_$FeedStateErrorImpl> get copyWith => __$$FeedStateErrorImplCopyWithImpl<_$FeedStateErrorImpl>(this, _$identity);
|
||||
_$$FeedStateErrorImplCopyWith<_$FeedStateErrorImpl> get copyWith =>
|
||||
__$$FeedStateErrorImplCopyWithImpl<_$FeedStateErrorImpl>(
|
||||
this, _$identity);
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
TResult when<TResult extends Object?>(
|
||||
TResult Function() $default, {
|
||||
required TResult Function() loading,
|
||||
required TResult Function(List<FeedBlogPostModel> feedBlogPostList, bool isLoading) loaded,
|
||||
required TResult Function(
|
||||
List<FeedBlogPostModel> feedBlogPostList, bool isLoading)
|
||||
loaded,
|
||||
required TResult Function(String errorMessage) error,
|
||||
}) {
|
||||
return error(errorMessage);
|
||||
@@ -547,7 +600,8 @@ class _$FeedStateErrorImpl implements FeedStateError {
|
||||
TResult? whenOrNull<TResult extends Object?>(
|
||||
TResult? Function()? $default, {
|
||||
TResult? Function()? loading,
|
||||
TResult? Function(List<FeedBlogPostModel> feedBlogPostList, bool isLoading)? loaded,
|
||||
TResult? Function(List<FeedBlogPostModel> feedBlogPostList, bool isLoading)?
|
||||
loaded,
|
||||
TResult? Function(String errorMessage)? error,
|
||||
}) {
|
||||
return error?.call(errorMessage);
|
||||
@@ -558,7 +612,8 @@ class _$FeedStateErrorImpl implements FeedStateError {
|
||||
TResult maybeWhen<TResult extends Object?>(
|
||||
TResult Function()? $default, {
|
||||
TResult Function()? loading,
|
||||
TResult Function(List<FeedBlogPostModel> feedBlogPostList, bool isLoading)? loaded,
|
||||
TResult Function(List<FeedBlogPostModel> feedBlogPostList, bool isLoading)?
|
||||
loaded,
|
||||
TResult Function(String errorMessage)? error,
|
||||
required TResult orElse(),
|
||||
}) {
|
||||
@@ -607,12 +662,14 @@ class _$FeedStateErrorImpl implements FeedStateError {
|
||||
}
|
||||
|
||||
abstract class FeedStateError implements FeedState {
|
||||
const factory FeedStateError({required final String errorMessage}) = _$FeedStateErrorImpl;
|
||||
const factory FeedStateError({required final String errorMessage}) =
|
||||
_$FeedStateErrorImpl;
|
||||
|
||||
String get errorMessage;
|
||||
|
||||
/// Create a copy of FeedState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$FeedStateErrorImplCopyWith<_$FeedStateErrorImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
_$$FeedStateErrorImplCopyWith<_$FeedStateErrorImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -13,11 +13,6 @@ class RecipesCubit extends Cubit<RecipesState> {
|
||||
bool isLoading = false;
|
||||
String? _query;
|
||||
|
||||
RecipesCubit({
|
||||
required this.feedRepository,
|
||||
required this.recipeRepository,
|
||||
}) : super(const RecipesState.loading());
|
||||
|
||||
loadRecipesList({
|
||||
String? query,
|
||||
}) async {
|
||||
@@ -40,6 +35,11 @@ class RecipesCubit extends Cubit<RecipesState> {
|
||||
}
|
||||
}
|
||||
|
||||
RecipesCubit({
|
||||
required this.feedRepository,
|
||||
required this.recipeRepository,
|
||||
}) : super(const RecipesState.loading());
|
||||
|
||||
loadNextPage() async {
|
||||
if (currentPage < lastPage && !isLoading) {
|
||||
isLoading = true;
|
||||
|
||||
@@ -20,16 +20,23 @@ mixin _$RecipesState {
|
||||
TResult when<TResult extends Object?>(
|
||||
TResult Function() $default, {
|
||||
required TResult Function() loading,
|
||||
required TResult Function(List<Recipes> recipesList, List<RecipeTag> recipesTags, Set<int> selectedTags, int selectedTagsCounter, bool isLoading) loaded,
|
||||
required TResult Function(
|
||||
List<Recipes> recipesList,
|
||||
List<RecipeTag> recipesTags,
|
||||
Set<int> selectedTags,
|
||||
int selectedTagsCounter,
|
||||
bool isLoading)
|
||||
loaded,
|
||||
required TResult Function(String errorMessage) error,
|
||||
}) =>
|
||||
throw _privateConstructorUsedError;
|
||||
|
||||
@optionalTypeArgs
|
||||
TResult? whenOrNull<TResult extends Object?>(
|
||||
TResult? Function()? $default, {
|
||||
TResult? Function()? loading,
|
||||
TResult? Function(List<Recipes> recipesList, List<RecipeTag> recipesTags, Set<int> selectedTags, int selectedTagsCounter, bool isLoading)? loaded,
|
||||
TResult? Function(List<Recipes> recipesList, List<RecipeTag> recipesTags,
|
||||
Set<int> selectedTags, int selectedTagsCounter, bool isLoading)?
|
||||
loaded,
|
||||
TResult? Function(String errorMessage)? error,
|
||||
}) =>
|
||||
throw _privateConstructorUsedError;
|
||||
@@ -37,7 +44,9 @@ mixin _$RecipesState {
|
||||
TResult maybeWhen<TResult extends Object?>(
|
||||
TResult Function()? $default, {
|
||||
TResult Function()? loading,
|
||||
TResult Function(List<Recipes> recipesList, List<RecipeTag> recipesTags, Set<int> selectedTags, int selectedTagsCounter, bool isLoading)? loaded,
|
||||
TResult Function(List<Recipes> recipesList, List<RecipeTag> recipesTags,
|
||||
Set<int> selectedTags, int selectedTagsCounter, bool isLoading)?
|
||||
loaded,
|
||||
TResult Function(String errorMessage)? error,
|
||||
required TResult orElse(),
|
||||
}) =>
|
||||
@@ -71,16 +80,18 @@ mixin _$RecipesState {
|
||||
|
||||
/// @nodoc
|
||||
abstract class $RecipesStateCopyWith<$Res> {
|
||||
factory $RecipesStateCopyWith(RecipesState value, $Res Function(RecipesState) then) = _$RecipesStateCopyWithImpl<$Res, RecipesState>;
|
||||
factory $RecipesStateCopyWith(
|
||||
RecipesState value, $Res Function(RecipesState) then) =
|
||||
_$RecipesStateCopyWithImpl<$Res, RecipesState>;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$RecipesStateCopyWithImpl<$Res, $Val extends RecipesState> implements $RecipesStateCopyWith<$Res> {
|
||||
class _$RecipesStateCopyWithImpl<$Res, $Val extends RecipesState>
|
||||
implements $RecipesStateCopyWith<$Res> {
|
||||
_$RecipesStateCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
@@ -90,12 +101,18 @@ class _$RecipesStateCopyWithImpl<$Res, $Val extends RecipesState> implements $Re
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$RecipesStateImplCopyWith<$Res> {
|
||||
factory _$$RecipesStateImplCopyWith(_$RecipesStateImpl value, $Res Function(_$RecipesStateImpl) then) = __$$RecipesStateImplCopyWithImpl<$Res>;
|
||||
factory _$$RecipesStateImplCopyWith(
|
||||
_$RecipesStateImpl value, $Res Function(_$RecipesStateImpl) then) =
|
||||
__$$RecipesStateImplCopyWithImpl<$Res>;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$RecipesStateImplCopyWithImpl<$Res> extends _$RecipesStateCopyWithImpl<$Res, _$RecipesStateImpl> implements _$$RecipesStateImplCopyWith<$Res> {
|
||||
__$$RecipesStateImplCopyWithImpl(_$RecipesStateImpl _value, $Res Function(_$RecipesStateImpl) _then) : super(_value, _then);
|
||||
class __$$RecipesStateImplCopyWithImpl<$Res>
|
||||
extends _$RecipesStateCopyWithImpl<$Res, _$RecipesStateImpl>
|
||||
implements _$$RecipesStateImplCopyWith<$Res> {
|
||||
__$$RecipesStateImplCopyWithImpl(
|
||||
_$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.
|
||||
@@ -113,7 +130,8 @@ class _$RecipesStateImpl implements _RecipesState {
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType && other is _$RecipesStateImpl);
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType && other is _$RecipesStateImpl);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -124,7 +142,13 @@ class _$RecipesStateImpl implements _RecipesState {
|
||||
TResult when<TResult extends Object?>(
|
||||
TResult Function() $default, {
|
||||
required TResult Function() loading,
|
||||
required TResult Function(List<Recipes> recipesList, List<RecipeTag> recipesTags, Set<int> selectedTags, int selectedTagsCounter, bool isLoading) loaded,
|
||||
required TResult Function(
|
||||
List<Recipes> recipesList,
|
||||
List<RecipeTag> recipesTags,
|
||||
Set<int> selectedTags,
|
||||
int selectedTagsCounter,
|
||||
bool isLoading)
|
||||
loaded,
|
||||
required TResult Function(String errorMessage) error,
|
||||
}) {
|
||||
return $default();
|
||||
@@ -135,7 +159,9 @@ class _$RecipesStateImpl implements _RecipesState {
|
||||
TResult? whenOrNull<TResult extends Object?>(
|
||||
TResult? Function()? $default, {
|
||||
TResult? Function()? loading,
|
||||
TResult? Function(List<Recipes> recipesList, List<RecipeTag> recipesTags, Set<int> selectedTags, int selectedTagsCounter, bool isLoading)? loaded,
|
||||
TResult? Function(List<Recipes> recipesList, List<RecipeTag> recipesTags,
|
||||
Set<int> selectedTags, int selectedTagsCounter, bool isLoading)?
|
||||
loaded,
|
||||
TResult? Function(String errorMessage)? error,
|
||||
}) {
|
||||
return $default?.call();
|
||||
@@ -146,7 +172,9 @@ class _$RecipesStateImpl implements _RecipesState {
|
||||
TResult maybeWhen<TResult extends Object?>(
|
||||
TResult Function()? $default, {
|
||||
TResult Function()? loading,
|
||||
TResult Function(List<Recipes> recipesList, List<RecipeTag> recipesTags, Set<int> selectedTags, int selectedTagsCounter, bool isLoading)? loaded,
|
||||
TResult Function(List<Recipes> recipesList, List<RecipeTag> recipesTags,
|
||||
Set<int> selectedTags, int selectedTagsCounter, bool isLoading)?
|
||||
loaded,
|
||||
TResult Function(String errorMessage)? error,
|
||||
required TResult orElse(),
|
||||
}) {
|
||||
@@ -200,14 +228,18 @@ abstract class _RecipesState implements RecipesState {
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$RecipesStateLoadingImplCopyWith<$Res> {
|
||||
factory _$$RecipesStateLoadingImplCopyWith(_$RecipesStateLoadingImpl value, $Res Function(_$RecipesStateLoadingImpl) then) =
|
||||
factory _$$RecipesStateLoadingImplCopyWith(_$RecipesStateLoadingImpl value,
|
||||
$Res Function(_$RecipesStateLoadingImpl) then) =
|
||||
__$$RecipesStateLoadingImplCopyWithImpl<$Res>;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$RecipesStateLoadingImplCopyWithImpl<$Res> extends _$RecipesStateCopyWithImpl<$Res, _$RecipesStateLoadingImpl>
|
||||
class __$$RecipesStateLoadingImplCopyWithImpl<$Res>
|
||||
extends _$RecipesStateCopyWithImpl<$Res, _$RecipesStateLoadingImpl>
|
||||
implements _$$RecipesStateLoadingImplCopyWith<$Res> {
|
||||
__$$RecipesStateLoadingImplCopyWithImpl(_$RecipesStateLoadingImpl _value, $Res Function(_$RecipesStateLoadingImpl) _then) : super(_value, _then);
|
||||
__$$RecipesStateLoadingImplCopyWithImpl(_$RecipesStateLoadingImpl _value,
|
||||
$Res Function(_$RecipesStateLoadingImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of RecipesState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -225,7 +257,9 @@ class _$RecipesStateLoadingImpl implements RecipesStateLoading {
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType && other is _$RecipesStateLoadingImpl);
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$RecipesStateLoadingImpl);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -236,7 +270,13 @@ class _$RecipesStateLoadingImpl implements RecipesStateLoading {
|
||||
TResult when<TResult extends Object?>(
|
||||
TResult Function() $default, {
|
||||
required TResult Function() loading,
|
||||
required TResult Function(List<Recipes> recipesList, List<RecipeTag> recipesTags, Set<int> selectedTags, int selectedTagsCounter, bool isLoading) loaded,
|
||||
required TResult Function(
|
||||
List<Recipes> recipesList,
|
||||
List<RecipeTag> recipesTags,
|
||||
Set<int> selectedTags,
|
||||
int selectedTagsCounter,
|
||||
bool isLoading)
|
||||
loaded,
|
||||
required TResult Function(String errorMessage) error,
|
||||
}) {
|
||||
return loading();
|
||||
@@ -247,7 +287,9 @@ class _$RecipesStateLoadingImpl implements RecipesStateLoading {
|
||||
TResult? whenOrNull<TResult extends Object?>(
|
||||
TResult? Function()? $default, {
|
||||
TResult? Function()? loading,
|
||||
TResult? Function(List<Recipes> recipesList, List<RecipeTag> recipesTags, Set<int> selectedTags, int selectedTagsCounter, bool isLoading)? loaded,
|
||||
TResult? Function(List<Recipes> recipesList, List<RecipeTag> recipesTags,
|
||||
Set<int> selectedTags, int selectedTagsCounter, bool isLoading)?
|
||||
loaded,
|
||||
TResult? Function(String errorMessage)? error,
|
||||
}) {
|
||||
return loading?.call();
|
||||
@@ -258,7 +300,9 @@ class _$RecipesStateLoadingImpl implements RecipesStateLoading {
|
||||
TResult maybeWhen<TResult extends Object?>(
|
||||
TResult Function()? $default, {
|
||||
TResult Function()? loading,
|
||||
TResult Function(List<Recipes> recipesList, List<RecipeTag> recipesTags, Set<int> selectedTags, int selectedTagsCounter, bool isLoading)? loaded,
|
||||
TResult Function(List<Recipes> recipesList, List<RecipeTag> recipesTags,
|
||||
Set<int> selectedTags, int selectedTagsCounter, bool isLoading)?
|
||||
loaded,
|
||||
TResult Function(String errorMessage)? error,
|
||||
required TResult orElse(),
|
||||
}) {
|
||||
@@ -312,17 +356,25 @@ abstract class RecipesStateLoading implements RecipesState {
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$RecipesStateLoadedImplCopyWith<$Res> {
|
||||
factory _$$RecipesStateLoadedImplCopyWith(_$RecipesStateLoadedImpl value, $Res Function(_$RecipesStateLoadedImpl) then) =
|
||||
factory _$$RecipesStateLoadedImplCopyWith(_$RecipesStateLoadedImpl value,
|
||||
$Res Function(_$RecipesStateLoadedImpl) then) =
|
||||
__$$RecipesStateLoadedImplCopyWithImpl<$Res>;
|
||||
|
||||
@useResult
|
||||
$Res call({List<Recipes> recipesList, List<RecipeTag> recipesTags, Set<int> selectedTags, int selectedTagsCounter, bool isLoading});
|
||||
$Res call(
|
||||
{List<Recipes> recipesList,
|
||||
List<RecipeTag> recipesTags,
|
||||
Set<int> selectedTags,
|
||||
int selectedTagsCounter,
|
||||
bool isLoading});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$RecipesStateLoadedImplCopyWithImpl<$Res> extends _$RecipesStateCopyWithImpl<$Res, _$RecipesStateLoadedImpl>
|
||||
class __$$RecipesStateLoadedImplCopyWithImpl<$Res>
|
||||
extends _$RecipesStateCopyWithImpl<$Res, _$RecipesStateLoadedImpl>
|
||||
implements _$$RecipesStateLoadedImplCopyWith<$Res> {
|
||||
__$$RecipesStateLoadedImplCopyWithImpl(_$RecipesStateLoadedImpl _value, $Res Function(_$RecipesStateLoadedImpl) _then) : super(_value, _then);
|
||||
__$$RecipesStateLoadedImplCopyWithImpl(_$RecipesStateLoadedImpl _value,
|
||||
$Res Function(_$RecipesStateLoadedImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of RecipesState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -374,7 +426,6 @@ class _$RecipesStateLoadedImpl implements RecipesStateLoaded {
|
||||
_selectedTags = selectedTags;
|
||||
|
||||
final List<Recipes> _recipesList;
|
||||
|
||||
@override
|
||||
List<Recipes> get recipesList {
|
||||
if (_recipesList is EqualUnmodifiableListView) return _recipesList;
|
||||
@@ -383,7 +434,6 @@ class _$RecipesStateLoadedImpl implements RecipesStateLoaded {
|
||||
}
|
||||
|
||||
final List<RecipeTag> _recipesTags;
|
||||
|
||||
@override
|
||||
List<RecipeTag> get recipesTags {
|
||||
if (_recipesTags is EqualUnmodifiableListView) return _recipesTags;
|
||||
@@ -392,7 +442,6 @@ class _$RecipesStateLoadedImpl implements RecipesStateLoaded {
|
||||
}
|
||||
|
||||
final Set<int> _selectedTags;
|
||||
|
||||
@override
|
||||
Set<int> get selectedTags {
|
||||
if (_selectedTags is EqualUnmodifiableSetView) return _selectedTags;
|
||||
@@ -415,16 +464,26 @@ class _$RecipesStateLoadedImpl implements RecipesStateLoaded {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$RecipesStateLoadedImpl &&
|
||||
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) || other.isLoading == isLoading));
|
||||
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) ||
|
||||
other.isLoading == isLoading));
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType, const DeepCollectionEquality().hash(_recipesList), const DeepCollectionEquality().hash(_recipesTags),
|
||||
const DeepCollectionEquality().hash(_selectedTags), selectedTagsCounter, isLoading);
|
||||
int get hashCode => Object.hash(
|
||||
runtimeType,
|
||||
const DeepCollectionEquality().hash(_recipesList),
|
||||
const DeepCollectionEquality().hash(_recipesTags),
|
||||
const DeepCollectionEquality().hash(_selectedTags),
|
||||
selectedTagsCounter,
|
||||
isLoading);
|
||||
|
||||
/// Create a copy of RecipesState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -432,17 +491,25 @@ class _$RecipesStateLoadedImpl implements RecipesStateLoaded {
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$RecipesStateLoadedImplCopyWith<_$RecipesStateLoadedImpl> get copyWith =>
|
||||
__$$RecipesStateLoadedImplCopyWithImpl<_$RecipesStateLoadedImpl>(this, _$identity);
|
||||
__$$RecipesStateLoadedImplCopyWithImpl<_$RecipesStateLoadedImpl>(
|
||||
this, _$identity);
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
TResult when<TResult extends Object?>(
|
||||
TResult Function() $default, {
|
||||
required TResult Function() loading,
|
||||
required TResult Function(List<Recipes> recipesList, List<RecipeTag> recipesTags, Set<int> selectedTags, int selectedTagsCounter, bool isLoading) loaded,
|
||||
required TResult Function(
|
||||
List<Recipes> recipesList,
|
||||
List<RecipeTag> recipesTags,
|
||||
Set<int> selectedTags,
|
||||
int selectedTagsCounter,
|
||||
bool isLoading)
|
||||
loaded,
|
||||
required TResult Function(String errorMessage) error,
|
||||
}) {
|
||||
return loaded(recipesList, recipesTags, selectedTags, selectedTagsCounter, isLoading);
|
||||
return loaded(
|
||||
recipesList, recipesTags, selectedTags, selectedTagsCounter, isLoading);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -450,10 +517,13 @@ class _$RecipesStateLoadedImpl implements RecipesStateLoaded {
|
||||
TResult? whenOrNull<TResult extends Object?>(
|
||||
TResult? Function()? $default, {
|
||||
TResult? Function()? loading,
|
||||
TResult? Function(List<Recipes> recipesList, List<RecipeTag> recipesTags, Set<int> selectedTags, int selectedTagsCounter, bool isLoading)? loaded,
|
||||
TResult? Function(List<Recipes> recipesList, List<RecipeTag> recipesTags,
|
||||
Set<int> selectedTags, int selectedTagsCounter, bool isLoading)?
|
||||
loaded,
|
||||
TResult? Function(String errorMessage)? error,
|
||||
}) {
|
||||
return loaded?.call(recipesList, recipesTags, selectedTags, selectedTagsCounter, isLoading);
|
||||
return loaded?.call(
|
||||
recipesList, recipesTags, selectedTags, selectedTagsCounter, isLoading);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -461,12 +531,15 @@ class _$RecipesStateLoadedImpl implements RecipesStateLoaded {
|
||||
TResult maybeWhen<TResult extends Object?>(
|
||||
TResult Function()? $default, {
|
||||
TResult Function()? loading,
|
||||
TResult Function(List<Recipes> recipesList, List<RecipeTag> recipesTags, Set<int> selectedTags, int selectedTagsCounter, bool isLoading)? loaded,
|
||||
TResult Function(List<Recipes> recipesList, List<RecipeTag> recipesTags,
|
||||
Set<int> selectedTags, int selectedTagsCounter, bool isLoading)?
|
||||
loaded,
|
||||
TResult Function(String errorMessage)? error,
|
||||
required TResult orElse(),
|
||||
}) {
|
||||
if (loaded != null) {
|
||||
return loaded(recipesList, recipesTags, selectedTags, selectedTagsCounter, isLoading);
|
||||
return loaded(recipesList, recipesTags, selectedTags, selectedTagsCounter,
|
||||
isLoading);
|
||||
}
|
||||
return orElse();
|
||||
}
|
||||
@@ -518,34 +591,34 @@ abstract class RecipesStateLoaded implements RecipesState {
|
||||
required final bool isLoading}) = _$RecipesStateLoadedImpl;
|
||||
|
||||
List<Recipes> get recipesList;
|
||||
|
||||
List<RecipeTag> get recipesTags;
|
||||
|
||||
Set<int> get selectedTags;
|
||||
|
||||
int get selectedTagsCounter;
|
||||
|
||||
bool get isLoading;
|
||||
|
||||
/// Create a copy of RecipesState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$RecipesStateLoadedImplCopyWith<_$RecipesStateLoadedImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
_$$RecipesStateLoadedImplCopyWith<_$RecipesStateLoadedImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$RecipesStateErrorImplCopyWith<$Res> {
|
||||
factory _$$RecipesStateErrorImplCopyWith(_$RecipesStateErrorImpl value, $Res Function(_$RecipesStateErrorImpl) then) =
|
||||
factory _$$RecipesStateErrorImplCopyWith(_$RecipesStateErrorImpl value,
|
||||
$Res Function(_$RecipesStateErrorImpl) then) =
|
||||
__$$RecipesStateErrorImplCopyWithImpl<$Res>;
|
||||
|
||||
@useResult
|
||||
$Res call({String errorMessage});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$RecipesStateErrorImplCopyWithImpl<$Res> extends _$RecipesStateCopyWithImpl<$Res, _$RecipesStateErrorImpl>
|
||||
class __$$RecipesStateErrorImplCopyWithImpl<$Res>
|
||||
extends _$RecipesStateCopyWithImpl<$Res, _$RecipesStateErrorImpl>
|
||||
implements _$$RecipesStateErrorImplCopyWith<$Res> {
|
||||
__$$RecipesStateErrorImplCopyWithImpl(_$RecipesStateErrorImpl _value, $Res Function(_$RecipesStateErrorImpl) _then) : super(_value, _then);
|
||||
__$$RecipesStateErrorImplCopyWithImpl(_$RecipesStateErrorImpl _value,
|
||||
$Res Function(_$RecipesStateErrorImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of RecipesState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -581,7 +654,8 @@ class _$RecipesStateErrorImpl implements RecipesStateError {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$RecipesStateErrorImpl &&
|
||||
(identical(other.errorMessage, errorMessage) || other.errorMessage == errorMessage));
|
||||
(identical(other.errorMessage, errorMessage) ||
|
||||
other.errorMessage == errorMessage));
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -592,14 +666,22 @@ class _$RecipesStateErrorImpl implements RecipesStateError {
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$RecipesStateErrorImplCopyWith<_$RecipesStateErrorImpl> get copyWith => __$$RecipesStateErrorImplCopyWithImpl<_$RecipesStateErrorImpl>(this, _$identity);
|
||||
_$$RecipesStateErrorImplCopyWith<_$RecipesStateErrorImpl> get copyWith =>
|
||||
__$$RecipesStateErrorImplCopyWithImpl<_$RecipesStateErrorImpl>(
|
||||
this, _$identity);
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
TResult when<TResult extends Object?>(
|
||||
TResult Function() $default, {
|
||||
required TResult Function() loading,
|
||||
required TResult Function(List<Recipes> recipesList, List<RecipeTag> recipesTags, Set<int> selectedTags, int selectedTagsCounter, bool isLoading) loaded,
|
||||
required TResult Function(
|
||||
List<Recipes> recipesList,
|
||||
List<RecipeTag> recipesTags,
|
||||
Set<int> selectedTags,
|
||||
int selectedTagsCounter,
|
||||
bool isLoading)
|
||||
loaded,
|
||||
required TResult Function(String errorMessage) error,
|
||||
}) {
|
||||
return error(errorMessage);
|
||||
@@ -610,7 +692,9 @@ class _$RecipesStateErrorImpl implements RecipesStateError {
|
||||
TResult? whenOrNull<TResult extends Object?>(
|
||||
TResult? Function()? $default, {
|
||||
TResult? Function()? loading,
|
||||
TResult? Function(List<Recipes> recipesList, List<RecipeTag> recipesTags, Set<int> selectedTags, int selectedTagsCounter, bool isLoading)? loaded,
|
||||
TResult? Function(List<Recipes> recipesList, List<RecipeTag> recipesTags,
|
||||
Set<int> selectedTags, int selectedTagsCounter, bool isLoading)?
|
||||
loaded,
|
||||
TResult? Function(String errorMessage)? error,
|
||||
}) {
|
||||
return error?.call(errorMessage);
|
||||
@@ -621,7 +705,9 @@ class _$RecipesStateErrorImpl implements RecipesStateError {
|
||||
TResult maybeWhen<TResult extends Object?>(
|
||||
TResult Function()? $default, {
|
||||
TResult Function()? loading,
|
||||
TResult Function(List<Recipes> recipesList, List<RecipeTag> recipesTags, Set<int> selectedTags, int selectedTagsCounter, bool isLoading)? loaded,
|
||||
TResult Function(List<Recipes> recipesList, List<RecipeTag> recipesTags,
|
||||
Set<int> selectedTags, int selectedTagsCounter, bool isLoading)?
|
||||
loaded,
|
||||
TResult Function(String errorMessage)? error,
|
||||
required TResult orElse(),
|
||||
}) {
|
||||
@@ -670,12 +756,14 @@ class _$RecipesStateErrorImpl implements RecipesStateError {
|
||||
}
|
||||
|
||||
abstract class RecipesStateError implements RecipesState {
|
||||
const factory RecipesStateError({required final String errorMessage}) = _$RecipesStateErrorImpl;
|
||||
const factory RecipesStateError({required final String errorMessage}) =
|
||||
_$RecipesStateErrorImpl;
|
||||
|
||||
String get errorMessage;
|
||||
|
||||
/// Create a copy of RecipesState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$RecipesStateErrorImplCopyWith<_$RecipesStateErrorImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
_$$RecipesStateErrorImplCopyWith<_$RecipesStateErrorImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -87,22 +87,11 @@ class _FeedScreenState extends State<FeedScreen> {
|
||||
await showModalBottomSheet(
|
||||
useRootNavigator: true,
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return BlocBuilder<RecipesCubit, RecipesState>(
|
||||
builder: (BuildContext context, RecipesState state) {
|
||||
if (state is RecipesStateLoaded) {
|
||||
return TagsModalWidget(
|
||||
tagsList: state.recipesTags,
|
||||
selectedTags: state.selectedTags,
|
||||
);
|
||||
} else {
|
||||
return Container();
|
||||
}
|
||||
},
|
||||
);
|
||||
},
|
||||
builder: (context) => TagsModalWidget(
|
||||
recipesCubit: recipesCubit,
|
||||
),
|
||||
);
|
||||
context.read<RecipesCubit>().loadRecipesList();
|
||||
recipesCubit.loadRecipesList();
|
||||
},
|
||||
)
|
||||
: null,
|
||||
@@ -402,8 +391,11 @@ class _FeedScreenState extends State<FeedScreen> {
|
||||
Duration(milliseconds: 500),
|
||||
() {
|
||||
switch (_selectedChipIndex) {
|
||||
case 0:
|
||||
feedCubit.loadFeedBlogPostList(query: query);
|
||||
break;
|
||||
case 1:
|
||||
context.read<RecipesCubit>().loadRecipesList(query: query);
|
||||
recipesCubit.loadRecipesList(query: query);
|
||||
break;
|
||||
}
|
||||
},
|
||||
@@ -414,8 +406,12 @@ class _FeedScreenState extends State<FeedScreen> {
|
||||
Duration(milliseconds: 500),
|
||||
() {
|
||||
switch (_selectedChipIndex) {
|
||||
case 0:
|
||||
feedCubit.loadFeedBlogPostList();
|
||||
break;
|
||||
case 1:
|
||||
context.read<RecipesCubit>().loadRecipesList(query: query);
|
||||
recipesCubit.loadRecipesList();
|
||||
break;
|
||||
}
|
||||
},
|
||||
);
|
||||
|
||||
@@ -105,7 +105,9 @@ class _BlogPostWidgetState extends State<BlogPostWidget> {
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 4),
|
||||
child: Html(
|
||||
data: widget.feedBlogPostModel.description,
|
||||
data: widget.feedBlogPostModel.description.length > 200
|
||||
? widget.feedBlogPostModel.description.substring(0, 200)
|
||||
: widget.feedBlogPostModel.description,
|
||||
style: {
|
||||
"*": Style(
|
||||
color: Colors.black87,
|
||||
@@ -113,6 +115,18 @@ class _BlogPostWidgetState extends State<BlogPostWidget> {
|
||||
},
|
||||
),
|
||||
),
|
||||
if (widget.feedBlogPostModel.description.length > 200)
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16),
|
||||
child: Text(
|
||||
'Читать полностью...',
|
||||
style: TextStyle(
|
||||
height: 1,
|
||||
color: appTheme.blueA400,
|
||||
decoration: TextDecoration.underline,
|
||||
),
|
||||
),
|
||||
),
|
||||
if (widget.feedBlogPostModel.title.isNotEmpty || widget.feedBlogPostModel.description.isNotEmpty) SizedBox(height: 8),
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import 'package:cached_network_image/cached_network_image.dart';
|
||||
import 'package:eatvio_app/core/const.dart';
|
||||
import 'package:eatvio_app/features/feed/models/diets_pagination_model.dart';
|
||||
import 'package:eatvio_app/theme/theme_helper.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_html/flutter_html.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
@@ -124,17 +125,30 @@ class _DietsWidgetState extends State<DietsWidget> {
|
||||
),
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 4),
|
||||
child: Html(
|
||||
data: widget.diet.details,
|
||||
style: {
|
||||
"*": Style(
|
||||
color: Colors.black87,
|
||||
),
|
||||
},
|
||||
if (widget.diet.details.isNotEmpty)
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 4),
|
||||
child: Html(
|
||||
data: widget.diet.details.length > 200 ? widget.diet.details.substring(0, 200) : widget.diet.details,
|
||||
style: {
|
||||
"*": Style(
|
||||
color: Colors.black87,
|
||||
),
|
||||
},
|
||||
),
|
||||
),
|
||||
if (widget.diet.details.length > 200)
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16),
|
||||
child: Text(
|
||||
'Читать полностью...',
|
||||
style: TextStyle(
|
||||
height: 1,
|
||||
color: appTheme.blueA400,
|
||||
decoration: TextDecoration.underline,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(height: 12),
|
||||
],
|
||||
),
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import 'package:cached_network_image/cached_network_image.dart';
|
||||
import 'package:eatvio_app/core/const.dart';
|
||||
import 'package:eatvio_app/features/feed/models/recipes_model.dart';
|
||||
import 'package:eatvio_app/theme/theme_helper.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_html/flutter_html.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
@@ -124,17 +125,30 @@ class _RecipesWidgetState extends State<RecipesWidget> {
|
||||
),
|
||||
),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 4),
|
||||
child: Html(
|
||||
data: widget.recipes.description,
|
||||
style: {
|
||||
"*": Style(
|
||||
color: Colors.black87,
|
||||
),
|
||||
},
|
||||
if (widget.recipes.description.isNotEmpty)
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 4),
|
||||
child: Html(
|
||||
data: widget.recipes.description.length > 200 ? widget.recipes.description.substring(0, 200) : widget.recipes.description,
|
||||
style: {
|
||||
"*": Style(
|
||||
color: Colors.black87,
|
||||
),
|
||||
},
|
||||
),
|
||||
),
|
||||
if (widget.recipes.description.length > 200)
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16),
|
||||
child: Text(
|
||||
'Читать полностью...',
|
||||
style: TextStyle(
|
||||
height: 1,
|
||||
color: appTheme.blueA400,
|
||||
decoration: TextDecoration.underline,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
SizedBox(height: 12),
|
||||
],
|
||||
),
|
||||
|
||||
@@ -1,17 +1,16 @@
|
||||
import 'package:eatvio_app/features/feed/presentation/bloc/recipes_cubit/recipes_cubit.dart';
|
||||
import 'package:eatvio_app/features/feed/presentation/bloc/recipes_cubit/recipes_state.dart';
|
||||
import 'package:eatvio_app/features/recipes/models/recipe_tag_model.dart';
|
||||
import 'package:eatvio_app/theme/theme_helper.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
|
||||
class TagsModalWidget extends StatefulWidget {
|
||||
final List<RecipeTag> tagsList;
|
||||
final Set<int> selectedTags;
|
||||
final RecipesCubit recipesCubit;
|
||||
|
||||
const TagsModalWidget({
|
||||
super.key,
|
||||
required this.tagsList,
|
||||
required this.selectedTags,
|
||||
required this.recipesCubit,
|
||||
});
|
||||
|
||||
@override
|
||||
@@ -21,20 +20,29 @@ class TagsModalWidget extends StatefulWidget {
|
||||
class _TagsModalWidgetState extends State<TagsModalWidget> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Container(
|
||||
padding: EdgeInsets.all(16),
|
||||
width: MediaQuery.of(context).size.width,
|
||||
child: Wrap(
|
||||
spacing: 8,
|
||||
runSpacing: -8,
|
||||
children: [
|
||||
for (int i = 0; i < widget.tagsList.length; i++)
|
||||
_tagChip(
|
||||
tag: widget.tagsList[i],
|
||||
isSelected: widget.selectedTags.contains(widget.tagsList[i].id),
|
||||
return BlocBuilder<RecipesCubit, RecipesState>(
|
||||
bloc: widget.recipesCubit,
|
||||
builder: (BuildContext context, RecipesState state) {
|
||||
if (state is RecipesStateLoaded) {
|
||||
return Container(
|
||||
padding: EdgeInsets.all(16),
|
||||
width: MediaQuery.of(context).size.width,
|
||||
child: Wrap(
|
||||
spacing: 8,
|
||||
runSpacing: -8,
|
||||
children: [
|
||||
for (int i = 0; i < state.recipesTags.length; i++)
|
||||
_tagChip(
|
||||
tag: state.recipesTags[i],
|
||||
isSelected: state.selectedTags.contains(state.recipesTags[i].id),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
} else {
|
||||
return Container();
|
||||
}
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
@@ -58,7 +66,7 @@ class _TagsModalWidgetState extends State<TagsModalWidget> {
|
||||
),
|
||||
selected: isSelected,
|
||||
backgroundColor: appTheme.gray100,
|
||||
onSelected: (bool selected) => context.read<RecipesCubit>().updateTags(tag),
|
||||
onSelected: (bool selected) => widget.recipesCubit.updateTags(tag),
|
||||
label: Text(
|
||||
'${tag.name} ${tag.recipesCount}',
|
||||
),
|
||||
|
||||
@@ -7,17 +7,29 @@ import 'package:eatvio_app/features/feed/services/feed_service.dart';
|
||||
class FeedRepository {
|
||||
final FeedService feedService;
|
||||
|
||||
FeedRepository({required this.feedService});
|
||||
FeedRepository({
|
||||
required this.feedService,
|
||||
});
|
||||
|
||||
Future<FeedBlogPostSettingsModel> getFeedBlogPosts({int page = 1}) async {
|
||||
Future<FeedBlogPostSettingsModel> getFeedBlogPosts({
|
||||
String? query,
|
||||
int page = 1,
|
||||
}) async {
|
||||
try {
|
||||
return (await feedService.getBlogPostList(page: page));
|
||||
return (await feedService.getBlogPostList(
|
||||
page: page,
|
||||
query: query,
|
||||
));
|
||||
} catch (e) {
|
||||
rethrow;
|
||||
}
|
||||
}
|
||||
|
||||
Future<List<Recipes>> getRecipes({String? query, List<int>? tags, int page = 1}) async {
|
||||
Future<List<Recipes>> getRecipes({
|
||||
String? query,
|
||||
List<int>? tags,
|
||||
int page = 1,
|
||||
}) async {
|
||||
try {
|
||||
return (await feedService.getRecipes(
|
||||
query: query,
|
||||
@@ -30,15 +42,23 @@ class FeedRepository {
|
||||
}
|
||||
}
|
||||
|
||||
Future<DietsPagination> getDiets({int page = 1}) async {
|
||||
Future<DietsPagination> getDiets({
|
||||
int page = 1,
|
||||
String? query,
|
||||
}) async {
|
||||
try {
|
||||
return (await feedService.getDiets(page: page));
|
||||
return (await feedService.getDiets(
|
||||
page: page,
|
||||
query: query,
|
||||
));
|
||||
} catch (e) {
|
||||
rethrow;
|
||||
}
|
||||
}
|
||||
|
||||
Future<CommentModel> getBlogPostComments(String id) async {
|
||||
Future<CommentModel> getBlogPostComments({
|
||||
required String id,
|
||||
}) async {
|
||||
try {
|
||||
return (await feedService.getBlogPostComments(id: id));
|
||||
} catch (e) {
|
||||
@@ -62,7 +82,9 @@ class FeedRepository {
|
||||
}
|
||||
}
|
||||
|
||||
Future<CommentModel> getDietsComments(String id) async {
|
||||
Future<CommentModel> getDietsComments({
|
||||
required String id,
|
||||
}) async {
|
||||
try {
|
||||
return (await feedService.getDietsComments(id: id));
|
||||
} catch (e) {
|
||||
@@ -86,7 +108,9 @@ class FeedRepository {
|
||||
}
|
||||
}
|
||||
|
||||
Future<CommentModel> getRecipesComments(String id) async {
|
||||
Future<CommentModel> getRecipesComments({
|
||||
required String id,
|
||||
}) async {
|
||||
try {
|
||||
return (await feedService.getRecipesComments(id: id));
|
||||
} catch (e) {
|
||||
@@ -110,7 +134,9 @@ class FeedRepository {
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> likeBlogPost(int id) async {
|
||||
Future<void> likeBlogPost({
|
||||
required int id,
|
||||
}) async {
|
||||
try {
|
||||
await feedService.likeBlogPost(id: id);
|
||||
} catch (e) {
|
||||
@@ -118,7 +144,9 @@ class FeedRepository {
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> unlikedBlogPost(int id) async {
|
||||
Future<void> unlikedBlogPost({
|
||||
required int id,
|
||||
}) async {
|
||||
try {
|
||||
await feedService.unlikedBlogPost(id: id);
|
||||
} catch (e) {
|
||||
|
||||
@@ -11,9 +11,10 @@ part 'feed_service.g.dart';
|
||||
abstract class FeedService {
|
||||
factory FeedService(Dio dio, {String baseUrl}) = _FeedService;
|
||||
|
||||
@GET('/api/blogPosts/index?page={page}')
|
||||
@GET('/api/blogPosts/index')
|
||||
Future<FeedBlogPostSettingsModel> getBlogPostList({
|
||||
@Path() required int page,
|
||||
@Query('query_search') String? query,
|
||||
});
|
||||
|
||||
@GET('/api/recipes/index')
|
||||
@@ -26,6 +27,7 @@ abstract class FeedService {
|
||||
@GET('/api/diets/index')
|
||||
Future<DietsPagination> getDiets({
|
||||
@Path() required int page,
|
||||
@Query('query_search') String? query,
|
||||
});
|
||||
|
||||
@GET('/api/blogPosts/{id}/comments/show')
|
||||
|
||||
@@ -22,9 +22,13 @@ class _FeedService implements FeedService {
|
||||
final ParseErrorLogger? errorLogger;
|
||||
|
||||
@override
|
||||
Future<FeedBlogPostSettingsModel> getBlogPostList({required int page}) async {
|
||||
Future<FeedBlogPostSettingsModel> getBlogPostList({
|
||||
required int page,
|
||||
String? query,
|
||||
}) async {
|
||||
final _extra = <String, dynamic>{};
|
||||
final queryParameters = <String, dynamic>{};
|
||||
final queryParameters = <String, dynamic>{r'query_search': query};
|
||||
queryParameters.removeWhere((k, v) => v == null);
|
||||
final _headers = <String, dynamic>{};
|
||||
const Map<String, dynamic>? _data = null;
|
||||
final _options = _setStreamType<FeedBlogPostSettingsModel>(Options(
|
||||
@@ -34,7 +38,7 @@ class _FeedService implements FeedService {
|
||||
)
|
||||
.compose(
|
||||
_dio.options,
|
||||
'/api/blogPosts/index?page=${page}',
|
||||
'/api/blogPosts/index',
|
||||
queryParameters: queryParameters,
|
||||
data: _data,
|
||||
)
|
||||
@@ -96,9 +100,13 @@ class _FeedService implements FeedService {
|
||||
}
|
||||
|
||||
@override
|
||||
Future<DietsPagination> getDiets({required int page}) async {
|
||||
Future<DietsPagination> getDiets({
|
||||
required int page,
|
||||
String? query,
|
||||
}) async {
|
||||
final _extra = <String, dynamic>{};
|
||||
final queryParameters = <String, dynamic>{};
|
||||
final queryParameters = <String, dynamic>{r'query_search': query};
|
||||
queryParameters.removeWhere((k, v) => v == null);
|
||||
final _headers = <String, dynamic>{};
|
||||
const Map<String, dynamic>? _data = null;
|
||||
final _options = _setStreamType<DietsPagination>(Options(
|
||||
@@ -398,7 +406,9 @@ class _FeedService implements FeedService {
|
||||
}
|
||||
|
||||
RequestOptions _setStreamType<T>(RequestOptions requestOptions) {
|
||||
if (T != dynamic && !(requestOptions.responseType == ResponseType.bytes || requestOptions.responseType == ResponseType.stream)) {
|
||||
if (T != dynamic &&
|
||||
!(requestOptions.responseType == ResponseType.bytes ||
|
||||
requestOptions.responseType == ResponseType.stream)) {
|
||||
if (T == String) {
|
||||
requestOptions.responseType = ResponseType.plain;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user