feat(order info): added order info screen

This commit is contained in:
Username1548
2025-04-04 20:21:31 +07:00
parent 9715f4cac9
commit 748484cf8f
387 changed files with 16171 additions and 18199 deletions

View File

@@ -12,8 +12,7 @@ part of 'comment_model.dart';
T _$identity<T>(T value) => value;
final _privateConstructorUsedError = UnsupportedError(
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models',
);
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');
CommentModel _$CommentModelFromJson(Map<String, dynamic> json) {
return _CommentModel.fromJson(json);
@@ -41,15 +40,13 @@ mixin _$CommentModel {
/// @nodoc
abstract class $CommentModelCopyWith<$Res> {
factory $CommentModelCopyWith(
CommentModel value,
$Res Function(CommentModel) then,
) = _$CommentModelCopyWithImpl<$Res, CommentModel>;
CommentModel value, $Res Function(CommentModel) then) =
_$CommentModelCopyWithImpl<$Res, CommentModel>;
@useResult
$Res call({
@JsonKey(name: "data") List<Comment> data,
@JsonKey(name: "links") Links links,
@JsonKey(name: "meta") Meta meta,
});
$Res call(
{@JsonKey(name: "data") List<Comment> data,
@JsonKey(name: "links") Links links,
@JsonKey(name: "meta") Meta meta});
$LinksCopyWith<$Res> get links;
$MetaCopyWith<$Res> get meta;
@@ -69,27 +66,25 @@ class _$CommentModelCopyWithImpl<$Res, $Val extends CommentModel>
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({Object? data = null, Object? links = null, Object? meta = null}) {
return _then(
_value.copyWith(
data:
null == data
? _value.data
: data // ignore: cast_nullable_to_non_nullable
as List<Comment>,
links:
null == links
? _value.links
: links // ignore: cast_nullable_to_non_nullable
as Links,
meta:
null == meta
? _value.meta
: meta // ignore: cast_nullable_to_non_nullable
as Meta,
)
as $Val,
);
$Res call({
Object? data = null,
Object? links = null,
Object? meta = null,
}) {
return _then(_value.copyWith(
data: null == data
? _value.data
: data // ignore: cast_nullable_to_non_nullable
as List<Comment>,
links: null == links
? _value.links
: links // ignore: cast_nullable_to_non_nullable
as Links,
meta: null == meta
? _value.meta
: meta // ignore: cast_nullable_to_non_nullable
as Meta,
) as $Val);
}
/// Create a copy of CommentModel
@@ -117,16 +112,14 @@ class _$CommentModelCopyWithImpl<$Res, $Val extends CommentModel>
abstract class _$$CommentModelImplCopyWith<$Res>
implements $CommentModelCopyWith<$Res> {
factory _$$CommentModelImplCopyWith(
_$CommentModelImpl value,
$Res Function(_$CommentModelImpl) then,
) = __$$CommentModelImplCopyWithImpl<$Res>;
_$CommentModelImpl value, $Res Function(_$CommentModelImpl) then) =
__$$CommentModelImplCopyWithImpl<$Res>;
@override
@useResult
$Res call({
@JsonKey(name: "data") List<Comment> data,
@JsonKey(name: "links") Links links,
@JsonKey(name: "meta") Meta meta,
});
$Res call(
{@JsonKey(name: "data") List<Comment> data,
@JsonKey(name: "links") Links links,
@JsonKey(name: "meta") Meta meta});
@override
$LinksCopyWith<$Res> get links;
@@ -139,45 +132,43 @@ class __$$CommentModelImplCopyWithImpl<$Res>
extends _$CommentModelCopyWithImpl<$Res, _$CommentModelImpl>
implements _$$CommentModelImplCopyWith<$Res> {
__$$CommentModelImplCopyWithImpl(
_$CommentModelImpl _value,
$Res Function(_$CommentModelImpl) _then,
) : super(_value, _then);
_$CommentModelImpl _value, $Res Function(_$CommentModelImpl) _then)
: super(_value, _then);
/// Create a copy of CommentModel
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({Object? data = null, Object? links = null, Object? meta = null}) {
return _then(
_$CommentModelImpl(
data:
null == data
? _value._data
: data // ignore: cast_nullable_to_non_nullable
as List<Comment>,
links:
null == links
? _value.links
: links // ignore: cast_nullable_to_non_nullable
as Links,
meta:
null == meta
? _value.meta
: meta // ignore: cast_nullable_to_non_nullable
as Meta,
),
);
$Res call({
Object? data = null,
Object? links = null,
Object? meta = null,
}) {
return _then(_$CommentModelImpl(
data: null == data
? _value._data
: data // ignore: cast_nullable_to_non_nullable
as List<Comment>,
links: null == links
? _value.links
: links // ignore: cast_nullable_to_non_nullable
as Links,
meta: null == meta
? _value.meta
: meta // ignore: cast_nullable_to_non_nullable
as Meta,
));
}
}
/// @nodoc
@JsonSerializable()
class _$CommentModelImpl implements _CommentModel {
const _$CommentModelImpl({
@JsonKey(name: "data") required final List<Comment> data,
@JsonKey(name: "links") required this.links,
@JsonKey(name: "meta") required this.meta,
}) : _data = data;
const _$CommentModelImpl(
{@JsonKey(name: "data") required final List<Comment> data,
@JsonKey(name: "links") required this.links,
@JsonKey(name: "meta") required this.meta})
: _data = data;
factory _$CommentModelImpl.fromJson(Map<String, dynamic> json) =>
_$$CommentModelImplFromJson(json);
@@ -216,11 +207,7 @@ class _$CommentModelImpl implements _CommentModel {
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(
runtimeType,
const DeepCollectionEquality().hash(_data),
links,
meta,
);
runtimeType, const DeepCollectionEquality().hash(_data), links, meta);
/// Create a copy of CommentModel
/// with the given fields replaced by the non-null parameter values.
@@ -232,16 +219,17 @@ class _$CommentModelImpl implements _CommentModel {
@override
Map<String, dynamic> toJson() {
return _$$CommentModelImplToJson(this);
return _$$CommentModelImplToJson(
this,
);
}
}
abstract class _CommentModel implements CommentModel {
const factory _CommentModel({
@JsonKey(name: "data") required final List<Comment> data,
@JsonKey(name: "links") required final Links links,
@JsonKey(name: "meta") required final Meta meta,
}) = _$CommentModelImpl;
const factory _CommentModel(
{@JsonKey(name: "data") required final List<Comment> data,
@JsonKey(name: "links") required final Links links,
@JsonKey(name: "meta") required final Meta meta}) = _$CommentModelImpl;
factory _CommentModel.fromJson(Map<String, dynamic> json) =
_$CommentModelImpl.fromJson;
@@ -297,14 +285,13 @@ abstract class $CommentCopyWith<$Res> {
factory $CommentCopyWith(Comment value, $Res Function(Comment) then) =
_$CommentCopyWithImpl<$Res, Comment>;
@useResult
$Res call({
@JsonKey(name: "id") int id,
@JsonKey(name: "author_name") String authorName,
@JsonKey(name: "author_profile_icon") String authorProfileIcon,
@JsonKey(name: "body") String body,
@JsonKey(name: "children_comments") List<Comment> childrenComments,
@JsonKey(name: "created_at") DateTime createdAt,
});
$Res call(
{@JsonKey(name: "id") int id,
@JsonKey(name: "author_name") String authorName,
@JsonKey(name: "author_profile_icon") String authorProfileIcon,
@JsonKey(name: "body") String body,
@JsonKey(name: "children_comments") List<Comment> childrenComments,
@JsonKey(name: "created_at") DateTime createdAt});
}
/// @nodoc
@@ -329,60 +316,49 @@ class _$CommentCopyWithImpl<$Res, $Val extends Comment>
Object? childrenComments = null,
Object? createdAt = null,
}) {
return _then(
_value.copyWith(
id:
null == id
? _value.id
: id // ignore: cast_nullable_to_non_nullable
as int,
authorName:
null == authorName
? _value.authorName
: authorName // ignore: cast_nullable_to_non_nullable
as String,
authorProfileIcon:
null == authorProfileIcon
? _value.authorProfileIcon
: authorProfileIcon // ignore: cast_nullable_to_non_nullable
as String,
body:
null == body
? _value.body
: body // ignore: cast_nullable_to_non_nullable
as String,
childrenComments:
null == childrenComments
? _value.childrenComments
: childrenComments // ignore: cast_nullable_to_non_nullable
as List<Comment>,
createdAt:
null == createdAt
? _value.createdAt
: createdAt // ignore: cast_nullable_to_non_nullable
as DateTime,
)
as $Val,
);
return _then(_value.copyWith(
id: null == id
? _value.id
: id // ignore: cast_nullable_to_non_nullable
as int,
authorName: null == authorName
? _value.authorName
: authorName // ignore: cast_nullable_to_non_nullable
as String,
authorProfileIcon: null == authorProfileIcon
? _value.authorProfileIcon
: authorProfileIcon // ignore: cast_nullable_to_non_nullable
as String,
body: null == body
? _value.body
: body // ignore: cast_nullable_to_non_nullable
as String,
childrenComments: null == childrenComments
? _value.childrenComments
: childrenComments // ignore: cast_nullable_to_non_nullable
as List<Comment>,
createdAt: null == createdAt
? _value.createdAt
: createdAt // ignore: cast_nullable_to_non_nullable
as DateTime,
) as $Val);
}
}
/// @nodoc
abstract class _$$CommentImplCopyWith<$Res> implements $CommentCopyWith<$Res> {
factory _$$CommentImplCopyWith(
_$CommentImpl value,
$Res Function(_$CommentImpl) then,
) = __$$CommentImplCopyWithImpl<$Res>;
_$CommentImpl value, $Res Function(_$CommentImpl) then) =
__$$CommentImplCopyWithImpl<$Res>;
@override
@useResult
$Res call({
@JsonKey(name: "id") int id,
@JsonKey(name: "author_name") String authorName,
@JsonKey(name: "author_profile_icon") String authorProfileIcon,
@JsonKey(name: "body") String body,
@JsonKey(name: "children_comments") List<Comment> childrenComments,
@JsonKey(name: "created_at") DateTime createdAt,
});
$Res call(
{@JsonKey(name: "id") int id,
@JsonKey(name: "author_name") String authorName,
@JsonKey(name: "author_profile_icon") String authorProfileIcon,
@JsonKey(name: "body") String body,
@JsonKey(name: "children_comments") List<Comment> childrenComments,
@JsonKey(name: "created_at") DateTime createdAt});
}
/// @nodoc
@@ -390,9 +366,8 @@ class __$$CommentImplCopyWithImpl<$Res>
extends _$CommentCopyWithImpl<$Res, _$CommentImpl>
implements _$$CommentImplCopyWith<$Res> {
__$$CommentImplCopyWithImpl(
_$CommentImpl _value,
$Res Function(_$CommentImpl) _then,
) : super(_value, _then);
_$CommentImpl _value, $Res Function(_$CommentImpl) _then)
: super(_value, _then);
/// Create a copy of Comment
/// with the given fields replaced by the non-null parameter values.
@@ -406,55 +381,47 @@ class __$$CommentImplCopyWithImpl<$Res>
Object? childrenComments = null,
Object? createdAt = null,
}) {
return _then(
_$CommentImpl(
id:
null == id
? _value.id
: id // ignore: cast_nullable_to_non_nullable
as int,
authorName:
null == authorName
? _value.authorName
: authorName // ignore: cast_nullable_to_non_nullable
as String,
authorProfileIcon:
null == authorProfileIcon
? _value.authorProfileIcon
: authorProfileIcon // ignore: cast_nullable_to_non_nullable
as String,
body:
null == body
? _value.body
: body // ignore: cast_nullable_to_non_nullable
as String,
childrenComments:
null == childrenComments
? _value._childrenComments
: childrenComments // ignore: cast_nullable_to_non_nullable
as List<Comment>,
createdAt:
null == createdAt
? _value.createdAt
: createdAt // ignore: cast_nullable_to_non_nullable
as DateTime,
),
);
return _then(_$CommentImpl(
id: null == id
? _value.id
: id // ignore: cast_nullable_to_non_nullable
as int,
authorName: null == authorName
? _value.authorName
: authorName // ignore: cast_nullable_to_non_nullable
as String,
authorProfileIcon: null == authorProfileIcon
? _value.authorProfileIcon
: authorProfileIcon // ignore: cast_nullable_to_non_nullable
as String,
body: null == body
? _value.body
: body // ignore: cast_nullable_to_non_nullable
as String,
childrenComments: null == childrenComments
? _value._childrenComments
: childrenComments // ignore: cast_nullable_to_non_nullable
as List<Comment>,
createdAt: null == createdAt
? _value.createdAt
: createdAt // ignore: cast_nullable_to_non_nullable
as DateTime,
));
}
}
/// @nodoc
@JsonSerializable()
class _$CommentImpl implements _Comment {
const _$CommentImpl({
@JsonKey(name: "id") required this.id,
@JsonKey(name: "author_name") required this.authorName,
@JsonKey(name: "author_profile_icon") required this.authorProfileIcon,
@JsonKey(name: "body") required this.body,
@JsonKey(name: "children_comments")
required final List<Comment> childrenComments,
@JsonKey(name: "created_at") required this.createdAt,
}) : _childrenComments = childrenComments;
const _$CommentImpl(
{@JsonKey(name: "id") required this.id,
@JsonKey(name: "author_name") required this.authorName,
@JsonKey(name: "author_profile_icon") required this.authorProfileIcon,
@JsonKey(name: "body") required this.body,
@JsonKey(name: "children_comments")
required final List<Comment> childrenComments,
@JsonKey(name: "created_at") required this.createdAt})
: _childrenComments = childrenComments;
factory _$CommentImpl.fromJson(Map<String, dynamic> json) =>
_$$CommentImplFromJson(json);
@@ -501,10 +468,8 @@ class _$CommentImpl implements _Comment {
(identical(other.authorProfileIcon, authorProfileIcon) ||
other.authorProfileIcon == authorProfileIcon) &&
(identical(other.body, body) || other.body == body) &&
const DeepCollectionEquality().equals(
other._childrenComments,
_childrenComments,
) &&
const DeepCollectionEquality()
.equals(other._childrenComments, _childrenComments) &&
(identical(other.createdAt, createdAt) ||
other.createdAt == createdAt));
}
@@ -512,14 +477,13 @@ class _$CommentImpl implements _Comment {
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(
runtimeType,
id,
authorName,
authorProfileIcon,
body,
const DeepCollectionEquality().hash(_childrenComments),
createdAt,
);
runtimeType,
id,
authorName,
authorProfileIcon,
body,
const DeepCollectionEquality().hash(_childrenComments),
createdAt);
/// Create a copy of Comment
/// with the given fields replaced by the non-null parameter values.
@@ -531,21 +495,23 @@ class _$CommentImpl implements _Comment {
@override
Map<String, dynamic> toJson() {
return _$$CommentImplToJson(this);
return _$$CommentImplToJson(
this,
);
}
}
abstract class _Comment implements Comment {
const factory _Comment({
@JsonKey(name: "id") required final int id,
@JsonKey(name: "author_name") required final String authorName,
@JsonKey(name: "author_profile_icon")
required final String authorProfileIcon,
@JsonKey(name: "body") required final String body,
@JsonKey(name: "children_comments")
required final List<Comment> childrenComments,
@JsonKey(name: "created_at") required final DateTime createdAt,
}) = _$CommentImpl;
const factory _Comment(
{@JsonKey(name: "id") required final int id,
@JsonKey(name: "author_name") required final String authorName,
@JsonKey(name: "author_profile_icon")
required final String authorProfileIcon,
@JsonKey(name: "body") required final String body,
@JsonKey(name: "children_comments")
required final List<Comment> childrenComments,
@JsonKey(name: "created_at") required final DateTime createdAt}) =
_$CommentImpl;
factory _Comment.fromJson(Map<String, dynamic> json) = _$CommentImpl.fromJson;

View File

@@ -8,10 +8,9 @@ part of 'comment_model.dart';
_$CommentModelImpl _$$CommentModelImplFromJson(Map<String, dynamic> json) =>
_$CommentModelImpl(
data:
(json['data'] as List<dynamic>)
.map((e) => Comment.fromJson(e as Map<String, dynamic>))
.toList(),
data: (json['data'] as List<dynamic>)
.map((e) => Comment.fromJson(e as Map<String, dynamic>))
.toList(),
links: Links.fromJson(json['links'] as Map<String, dynamic>),
meta: Meta.fromJson(json['meta'] as Map<String, dynamic>),
);
@@ -29,10 +28,9 @@ _$CommentImpl _$$CommentImplFromJson(Map<String, dynamic> json) =>
authorName: json['author_name'] as String,
authorProfileIcon: json['author_profile_icon'] as String,
body: json['body'] as String,
childrenComments:
(json['children_comments'] as List<dynamic>)
.map((e) => Comment.fromJson(e as Map<String, dynamic>))
.toList(),
childrenComments: (json['children_comments'] as List<dynamic>)
.map((e) => Comment.fromJson(e as Map<String, dynamic>))
.toList(),
createdAt: DateTime.parse(json['created_at'] as String),
);

View File

@@ -47,6 +47,7 @@ enum DietState {
@JsonKey(name: 'personal')
personal;
@override
String toString() {
switch (this) {
case DietState.active:
@@ -113,20 +114,20 @@ int _parseQuantity(dynamic quantity) {
enum Portion {
@JsonValue("gr")
GRAMS,
grams,
@JsonValue("milliliters")
MILLILITERS,
milliliters,
@JsonValue("pcs")
PCS;
pcs;
static Portion? getPortionFromValue(String value) {
switch (value) {
case 'gr':
return Portion.GRAMS;
return Portion.grams;
case 'milliliters':
return Portion.MILLILITERS;
return Portion.milliliters;
case 'pcs':
return Portion.PCS;
return Portion.pcs;
default:
return null;
}

File diff suppressed because it is too large Load Diff

View File

@@ -7,87 +7,75 @@ part of 'diets_pagination_model.dart';
// **************************************************************************
_$DietsPaginationImpl _$$DietsPaginationImplFromJson(
Map<String, dynamic> json,
) => _$DietsPaginationImpl(
data:
(json['data'] as List<dynamic>)
Map<String, dynamic> json) =>
_$DietsPaginationImpl(
data: (json['data'] as List<dynamic>)
.map((e) => Diet.fromJson(e as Map<String, dynamic>))
.toList(),
links: Links.fromJson(json['links'] as Map<String, dynamic>),
meta: Meta.fromJson(json['meta'] as Map<String, dynamic>),
);
links: Links.fromJson(json['links'] as Map<String, dynamic>),
meta: Meta.fromJson(json['meta'] as Map<String, dynamic>),
);
Map<String, dynamic> _$$DietsPaginationImplToJson(
_$DietsPaginationImpl instance,
) => <String, dynamic>{
'data': instance.data,
'links': instance.links,
'meta': instance.meta,
};
_$DietsPaginationImpl instance) =>
<String, dynamic>{
'data': instance.data,
'links': instance.links,
'meta': instance.meta,
};
_$DietImpl _$$DietImplFromJson(Map<String, dynamic> json) => _$DietImpl(
id: (json['id'] as num).toInt(),
name: json['name'] as String,
image: json['image'] as String,
duration: (json['duration'] as num).toInt(),
state: $enumDecode(_$DietStateEnumMap, json['state']),
type: DietType.fromJson(json['type'] as Map<String, dynamic>),
details: json['description_md'] as String,
dailySchedule: (json['daily_schedule'] as Map<String, dynamic>).map(
(k, e) => MapEntry(
int.parse(k),
(e as Map<String, dynamic>).map(
id: (json['id'] as num).toInt(),
name: json['name'] as String,
image: json['image'] as String,
duration: (json['duration'] as num).toInt(),
state: $enumDecode(_$DietStateEnumMap, json['state']),
type: DietType.fromJson(json['type'] as Map<String, dynamic>),
details: json['description_md'] as String,
dailySchedule: (json['daily_schedule'] as Map<String, dynamic>).map(
(k, e) => MapEntry(
int.parse(k),
(e as Map<String, dynamic>).map(
(k, e) => MapEntry(
int.parse(k),
DailySchedule.fromJson(e as Map<String, dynamic>),
),
),
),
int.parse(k),
(e as Map<String, dynamic>).map(
(k, e) => MapEntry(
int.parse(k),
(e as Map<String, dynamic>).map(
(k, e) => MapEntry(int.parse(k),
DailySchedule.fromJson(e as Map<String, dynamic>)),
)),
)),
),
),
),
author: Author.fromJson(json['author'] as Map<String, dynamic>),
totalLikes: (json['total_likes'] as num).toInt(),
totalViews: (json['total_views'] as num).toInt(),
totalComments: (json['total_comments'] as num).toInt(),
wasLikedByMe: json['was_liked_by_me'] as bool,
isFavorite: json['is_favorite'] as bool,
dailyNutrition:
(json['daily_nutrition'] as List<dynamic>)
author: Author.fromJson(json['author'] as Map<String, dynamic>),
totalLikes: (json['total_likes'] as num).toInt(),
totalViews: (json['total_views'] as num).toInt(),
totalComments: (json['total_comments'] as num).toInt(),
wasLikedByMe: json['was_liked_by_me'] as bool,
isFavorite: json['is_favorite'] as bool,
dailyNutrition: (json['daily_nutrition'] as List<dynamic>)
.map((e) => DailyNutrition.fromJson(e as Map<String, dynamic>))
.toList(),
);
);
Map<String, dynamic> _$$DietImplToJson(
_$DietImpl instance,
) => <String, dynamic>{
'id': instance.id,
'name': instance.name,
'image': instance.image,
'duration': instance.duration,
'state': _$DietStateEnumMap[instance.state]!,
'type': instance.type,
'description_md': instance.details,
'daily_schedule': instance.dailySchedule.map(
(k, e) => MapEntry(
k.toString(),
e.map(
(k, e) =>
MapEntry(k.toString(), e.map((k, e) => MapEntry(k.toString(), e))),
),
),
),
'author': instance.author,
'total_likes': instance.totalLikes,
'total_views': instance.totalViews,
'total_comments': instance.totalComments,
'was_liked_by_me': instance.wasLikedByMe,
'is_favorite': instance.isFavorite,
'daily_nutrition': instance.dailyNutrition,
};
Map<String, dynamic> _$$DietImplToJson(_$DietImpl instance) =>
<String, dynamic>{
'id': instance.id,
'name': instance.name,
'image': instance.image,
'duration': instance.duration,
'state': _$DietStateEnumMap[instance.state]!,
'type': instance.type,
'description_md': instance.details,
'daily_schedule': instance.dailySchedule.map((k, e) => MapEntry(
k.toString(),
e.map((k, e) => MapEntry(
k.toString(), e.map((k, e) => MapEntry(k.toString(), e)))))),
'author': instance.author,
'total_likes': instance.totalLikes,
'total_views': instance.totalViews,
'total_comments': instance.totalComments,
'was_liked_by_me': instance.wasLikedByMe,
'is_favorite': instance.isFavorite,
'daily_nutrition': instance.dailyNutrition,
};
const _$DietStateEnumMap = {
DietState.active: 'active',
@@ -96,19 +84,23 @@ const _$DietStateEnumMap = {
};
_$CreatedDietImpl _$$CreatedDietImplFromJson(Map<String, dynamic> json) =>
_$CreatedDietImpl(id: (json['id'] as num).toInt());
_$CreatedDietImpl(
id: (json['id'] as num).toInt(),
);
Map<String, dynamic> _$$CreatedDietImplToJson(_$CreatedDietImpl instance) =>
<String, dynamic>{'id': instance.id};
<String, dynamic>{
'id': instance.id,
};
_$AuthorImpl _$$AuthorImplFromJson(Map<String, dynamic> json) => _$AuthorImpl(
authorSlug: json['author_slug'] as String,
authorName: json['author_name'] as String,
authorProfileIcon: json['author_profile_icon'] as String,
authorIsMe: json['author_is_me'] as bool,
isEntitySubscribedByMe: json['is_entity_subscribed_by_me'] as bool?,
authorPlaceInRating: (json['author_place_in_rating'] as num?)?.toInt(),
);
authorSlug: json['author_slug'] as String,
authorName: json['author_name'] as String,
authorProfileIcon: json['author_profile_icon'] as String,
authorIsMe: json['author_is_me'] as bool,
isEntitySubscribedByMe: json['is_entity_subscribed_by_me'] as bool?,
authorPlaceInRating: (json['author_place_in_rating'] as num?)?.toInt(),
);
Map<String, dynamic> _$$AuthorImplToJson(_$AuthorImpl instance) =>
<String, dynamic>{
@@ -125,12 +117,9 @@ _$DailyScheduleImpl _$$DailyScheduleImplFromJson(Map<String, dynamic> json) =>
name: json['name'] as String,
portion: $enumDecode(_$PortionEnumMap, json['portion']),
quantity: _parseQuantity(json['quantity']),
dailyNutrition:
json['nutrition'] == null
? null
: DailyNutrition.fromJson(
json['nutrition'] as Map<String, dynamic>,
),
dailyNutrition: json['nutrition'] == null
? null
: DailyNutrition.fromJson(json['nutrition'] as Map<String, dynamic>),
);
Map<String, dynamic> _$$DailyScheduleImplToJson(_$DailyScheduleImpl instance) =>
@@ -143,9 +132,9 @@ Map<String, dynamic> _$$DailyScheduleImplToJson(_$DailyScheduleImpl instance) =>
};
const _$PortionEnumMap = {
Portion.GRAMS: 'gr',
Portion.MILLILITERS: 'milliliters',
Portion.PCS: 'pcs',
Portion.grams: 'gr',
Portion.milliliters: 'milliliters',
Portion.pcs: 'pcs',
};
_$DietTypeImpl _$$DietTypeImplFromJson(Map<String, dynamic> json) =>
@@ -173,10 +162,10 @@ _$DailyNutritionImpl _$$DailyNutritionImplFromJson(Map<String, dynamic> json) =>
);
Map<String, dynamic> _$$DailyNutritionImplToJson(
_$DailyNutritionImpl instance,
) => <String, dynamic>{
'energy': instance.energy,
'proteins': instance.proteins,
'fats': instance.fats,
'carbohydrates': instance.carbohydrates,
};
_$DailyNutritionImpl instance) =>
<String, dynamic>{
'energy': instance.energy,
'proteins': instance.proteins,
'fats': instance.fats,
'carbohydrates': instance.carbohydrates,
};

View File

@@ -12,8 +12,7 @@ part of 'feed_blog_post_model.dart';
T _$identity<T>(T value) => value;
final _privateConstructorUsedError = UnsupportedError(
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models',
);
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');
FeedBlogPostModel _$FeedBlogPostModelFromJson(Map<String, dynamic> json) {
return _FeedBlogPostModel.fromJson(json);
@@ -55,25 +54,23 @@ mixin _$FeedBlogPostModel {
/// @nodoc
abstract class $FeedBlogPostModelCopyWith<$Res> {
factory $FeedBlogPostModelCopyWith(
FeedBlogPostModel value,
$Res Function(FeedBlogPostModel) then,
) = _$FeedBlogPostModelCopyWithImpl<$Res, FeedBlogPostModel>;
FeedBlogPostModel value, $Res Function(FeedBlogPostModel) then) =
_$FeedBlogPostModelCopyWithImpl<$Res, FeedBlogPostModel>;
@useResult
$Res call({
int id,
String state,
String image,
String description,
Author author,
@JsonKey(name: "video_url") String videoUrl,
@JsonKey(name: "created_at", fromJson: parseDate) DateTime createdAt,
@JsonKey(name: "updated_at", fromJson: parseDate) DateTime updatedAt,
String title,
@JsonKey(name: "total_likes") int totalLikes,
@JsonKey(name: "total_views") int totalViews,
@JsonKey(name: "total_comments") int totalComments,
@JsonKey(name: "was_liked_by_me") bool wasLikedByMe,
});
$Res call(
{int id,
String state,
String image,
String description,
Author author,
@JsonKey(name: "video_url") String videoUrl,
@JsonKey(name: "created_at", fromJson: parseDate) DateTime createdAt,
@JsonKey(name: "updated_at", fromJson: parseDate) DateTime updatedAt,
String title,
@JsonKey(name: "total_likes") int totalLikes,
@JsonKey(name: "total_views") int totalViews,
@JsonKey(name: "total_comments") int totalComments,
@JsonKey(name: "was_liked_by_me") bool wasLikedByMe});
$AuthorCopyWith<$Res> get author;
}
@@ -107,76 +104,60 @@ class _$FeedBlogPostModelCopyWithImpl<$Res, $Val extends FeedBlogPostModel>
Object? totalComments = null,
Object? wasLikedByMe = null,
}) {
return _then(
_value.copyWith(
id:
null == id
? _value.id
: id // ignore: cast_nullable_to_non_nullable
as int,
state:
null == state
? _value.state
: state // ignore: cast_nullable_to_non_nullable
as String,
image:
null == image
? _value.image
: image // ignore: cast_nullable_to_non_nullable
as String,
description:
null == description
? _value.description
: description // ignore: cast_nullable_to_non_nullable
as String,
author:
null == author
? _value.author
: author // ignore: cast_nullable_to_non_nullable
as Author,
videoUrl:
null == videoUrl
? _value.videoUrl
: videoUrl // ignore: cast_nullable_to_non_nullable
as String,
createdAt:
null == createdAt
? _value.createdAt
: createdAt // ignore: cast_nullable_to_non_nullable
as DateTime,
updatedAt:
null == updatedAt
? _value.updatedAt
: updatedAt // ignore: cast_nullable_to_non_nullable
as DateTime,
title:
null == title
? _value.title
: title // ignore: cast_nullable_to_non_nullable
as String,
totalLikes:
null == totalLikes
? _value.totalLikes
: totalLikes // ignore: cast_nullable_to_non_nullable
as int,
totalViews:
null == totalViews
? _value.totalViews
: totalViews // ignore: cast_nullable_to_non_nullable
as int,
totalComments:
null == totalComments
? _value.totalComments
: totalComments // ignore: cast_nullable_to_non_nullable
as int,
wasLikedByMe:
null == wasLikedByMe
? _value.wasLikedByMe
: wasLikedByMe // ignore: cast_nullable_to_non_nullable
as bool,
)
as $Val,
);
return _then(_value.copyWith(
id: null == id
? _value.id
: id // ignore: cast_nullable_to_non_nullable
as int,
state: null == state
? _value.state
: state // ignore: cast_nullable_to_non_nullable
as String,
image: null == image
? _value.image
: image // ignore: cast_nullable_to_non_nullable
as String,
description: null == description
? _value.description
: description // ignore: cast_nullable_to_non_nullable
as String,
author: null == author
? _value.author
: author // ignore: cast_nullable_to_non_nullable
as Author,
videoUrl: null == videoUrl
? _value.videoUrl
: videoUrl // ignore: cast_nullable_to_non_nullable
as String,
createdAt: null == createdAt
? _value.createdAt
: createdAt // ignore: cast_nullable_to_non_nullable
as DateTime,
updatedAt: null == updatedAt
? _value.updatedAt
: updatedAt // ignore: cast_nullable_to_non_nullable
as DateTime,
title: null == title
? _value.title
: title // ignore: cast_nullable_to_non_nullable
as String,
totalLikes: null == totalLikes
? _value.totalLikes
: totalLikes // ignore: cast_nullable_to_non_nullable
as int,
totalViews: null == totalViews
? _value.totalViews
: totalViews // ignore: cast_nullable_to_non_nullable
as int,
totalComments: null == totalComments
? _value.totalComments
: totalComments // ignore: cast_nullable_to_non_nullable
as int,
wasLikedByMe: null == wasLikedByMe
? _value.wasLikedByMe
: wasLikedByMe // ignore: cast_nullable_to_non_nullable
as bool,
) as $Val);
}
/// Create a copy of FeedBlogPostModel
@@ -193,27 +174,25 @@ class _$FeedBlogPostModelCopyWithImpl<$Res, $Val extends FeedBlogPostModel>
/// @nodoc
abstract class _$$FeedBlogPostModelImplCopyWith<$Res>
implements $FeedBlogPostModelCopyWith<$Res> {
factory _$$FeedBlogPostModelImplCopyWith(
_$FeedBlogPostModelImpl value,
$Res Function(_$FeedBlogPostModelImpl) then,
) = __$$FeedBlogPostModelImplCopyWithImpl<$Res>;
factory _$$FeedBlogPostModelImplCopyWith(_$FeedBlogPostModelImpl value,
$Res Function(_$FeedBlogPostModelImpl) then) =
__$$FeedBlogPostModelImplCopyWithImpl<$Res>;
@override
@useResult
$Res call({
int id,
String state,
String image,
String description,
Author author,
@JsonKey(name: "video_url") String videoUrl,
@JsonKey(name: "created_at", fromJson: parseDate) DateTime createdAt,
@JsonKey(name: "updated_at", fromJson: parseDate) DateTime updatedAt,
String title,
@JsonKey(name: "total_likes") int totalLikes,
@JsonKey(name: "total_views") int totalViews,
@JsonKey(name: "total_comments") int totalComments,
@JsonKey(name: "was_liked_by_me") bool wasLikedByMe,
});
$Res call(
{int id,
String state,
String image,
String description,
Author author,
@JsonKey(name: "video_url") String videoUrl,
@JsonKey(name: "created_at", fromJson: parseDate) DateTime createdAt,
@JsonKey(name: "updated_at", fromJson: parseDate) DateTime updatedAt,
String title,
@JsonKey(name: "total_likes") int totalLikes,
@JsonKey(name: "total_views") int totalViews,
@JsonKey(name: "total_comments") int totalComments,
@JsonKey(name: "was_liked_by_me") bool wasLikedByMe});
@override
$AuthorCopyWith<$Res> get author;
@@ -223,10 +202,9 @@ abstract class _$$FeedBlogPostModelImplCopyWith<$Res>
class __$$FeedBlogPostModelImplCopyWithImpl<$Res>
extends _$FeedBlogPostModelCopyWithImpl<$Res, _$FeedBlogPostModelImpl>
implements _$$FeedBlogPostModelImplCopyWith<$Res> {
__$$FeedBlogPostModelImplCopyWithImpl(
_$FeedBlogPostModelImpl _value,
$Res Function(_$FeedBlogPostModelImpl) _then,
) : super(_value, _then);
__$$FeedBlogPostModelImplCopyWithImpl(_$FeedBlogPostModelImpl _value,
$Res Function(_$FeedBlogPostModelImpl) _then)
: super(_value, _then);
/// Create a copy of FeedBlogPostModel
/// with the given fields replaced by the non-null parameter values.
@@ -247,96 +225,80 @@ class __$$FeedBlogPostModelImplCopyWithImpl<$Res>
Object? totalComments = null,
Object? wasLikedByMe = null,
}) {
return _then(
_$FeedBlogPostModelImpl(
id:
null == id
? _value.id
: id // ignore: cast_nullable_to_non_nullable
as int,
state:
null == state
? _value.state
: state // ignore: cast_nullable_to_non_nullable
as String,
image:
null == image
? _value.image
: image // ignore: cast_nullable_to_non_nullable
as String,
description:
null == description
? _value.description
: description // ignore: cast_nullable_to_non_nullable
as String,
author:
null == author
? _value.author
: author // ignore: cast_nullable_to_non_nullable
as Author,
videoUrl:
null == videoUrl
? _value.videoUrl
: videoUrl // ignore: cast_nullable_to_non_nullable
as String,
createdAt:
null == createdAt
? _value.createdAt
: createdAt // ignore: cast_nullable_to_non_nullable
as DateTime,
updatedAt:
null == updatedAt
? _value.updatedAt
: updatedAt // ignore: cast_nullable_to_non_nullable
as DateTime,
title:
null == title
? _value.title
: title // ignore: cast_nullable_to_non_nullable
as String,
totalLikes:
null == totalLikes
? _value.totalLikes
: totalLikes // ignore: cast_nullable_to_non_nullable
as int,
totalViews:
null == totalViews
? _value.totalViews
: totalViews // ignore: cast_nullable_to_non_nullable
as int,
totalComments:
null == totalComments
? _value.totalComments
: totalComments // ignore: cast_nullable_to_non_nullable
as int,
wasLikedByMe:
null == wasLikedByMe
? _value.wasLikedByMe
: wasLikedByMe // ignore: cast_nullable_to_non_nullable
as bool,
),
);
return _then(_$FeedBlogPostModelImpl(
id: null == id
? _value.id
: id // ignore: cast_nullable_to_non_nullable
as int,
state: null == state
? _value.state
: state // ignore: cast_nullable_to_non_nullable
as String,
image: null == image
? _value.image
: image // ignore: cast_nullable_to_non_nullable
as String,
description: null == description
? _value.description
: description // ignore: cast_nullable_to_non_nullable
as String,
author: null == author
? _value.author
: author // ignore: cast_nullable_to_non_nullable
as Author,
videoUrl: null == videoUrl
? _value.videoUrl
: videoUrl // ignore: cast_nullable_to_non_nullable
as String,
createdAt: null == createdAt
? _value.createdAt
: createdAt // ignore: cast_nullable_to_non_nullable
as DateTime,
updatedAt: null == updatedAt
? _value.updatedAt
: updatedAt // ignore: cast_nullable_to_non_nullable
as DateTime,
title: null == title
? _value.title
: title // ignore: cast_nullable_to_non_nullable
as String,
totalLikes: null == totalLikes
? _value.totalLikes
: totalLikes // ignore: cast_nullable_to_non_nullable
as int,
totalViews: null == totalViews
? _value.totalViews
: totalViews // ignore: cast_nullable_to_non_nullable
as int,
totalComments: null == totalComments
? _value.totalComments
: totalComments // ignore: cast_nullable_to_non_nullable
as int,
wasLikedByMe: null == wasLikedByMe
? _value.wasLikedByMe
: wasLikedByMe // ignore: cast_nullable_to_non_nullable
as bool,
));
}
}
/// @nodoc
@JsonSerializable()
class _$FeedBlogPostModelImpl implements _FeedBlogPostModel {
const _$FeedBlogPostModelImpl({
required this.id,
required this.state,
required this.image,
required this.description,
required this.author,
@JsonKey(name: "video_url") required this.videoUrl,
@JsonKey(name: "created_at", fromJson: parseDate) required this.createdAt,
@JsonKey(name: "updated_at", fromJson: parseDate) required this.updatedAt,
required this.title,
@JsonKey(name: "total_likes") required this.totalLikes,
@JsonKey(name: "total_views") required this.totalViews,
@JsonKey(name: "total_comments") required this.totalComments,
@JsonKey(name: "was_liked_by_me") required this.wasLikedByMe,
});
const _$FeedBlogPostModelImpl(
{required this.id,
required this.state,
required this.image,
required this.description,
required this.author,
@JsonKey(name: "video_url") required this.videoUrl,
@JsonKey(name: "created_at", fromJson: parseDate) required this.createdAt,
@JsonKey(name: "updated_at", fromJson: parseDate) required this.updatedAt,
required this.title,
@JsonKey(name: "total_likes") required this.totalLikes,
@JsonKey(name: "total_views") required this.totalViews,
@JsonKey(name: "total_comments") required this.totalComments,
@JsonKey(name: "was_liked_by_me") required this.wasLikedByMe});
factory _$FeedBlogPostModelImpl.fromJson(Map<String, dynamic> json) =>
_$$FeedBlogPostModelImplFromJson(json);
@@ -411,21 +373,20 @@ class _$FeedBlogPostModelImpl implements _FeedBlogPostModel {
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(
runtimeType,
id,
state,
image,
description,
author,
videoUrl,
createdAt,
updatedAt,
title,
totalLikes,
totalViews,
totalComments,
wasLikedByMe,
);
runtimeType,
id,
state,
image,
description,
author,
videoUrl,
createdAt,
updatedAt,
title,
totalLikes,
totalViews,
totalComments,
wasLikedByMe);
/// Create a copy of FeedBlogPostModel
/// with the given fields replaced by the non-null parameter values.
@@ -434,34 +395,34 @@ class _$FeedBlogPostModelImpl implements _FeedBlogPostModel {
@pragma('vm:prefer-inline')
_$$FeedBlogPostModelImplCopyWith<_$FeedBlogPostModelImpl> get copyWith =>
__$$FeedBlogPostModelImplCopyWithImpl<_$FeedBlogPostModelImpl>(
this,
_$identity,
);
this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$$FeedBlogPostModelImplToJson(this);
return _$$FeedBlogPostModelImplToJson(
this,
);
}
}
abstract class _FeedBlogPostModel implements FeedBlogPostModel {
const factory _FeedBlogPostModel({
required final int id,
required final String state,
required final String image,
required final String description,
required final Author author,
@JsonKey(name: "video_url") required final String videoUrl,
@JsonKey(name: "created_at", fromJson: parseDate)
required final DateTime createdAt,
@JsonKey(name: "updated_at", fromJson: parseDate)
required final DateTime updatedAt,
required final String title,
@JsonKey(name: "total_likes") required final int totalLikes,
@JsonKey(name: "total_views") required final int totalViews,
@JsonKey(name: "total_comments") required final int totalComments,
@JsonKey(name: "was_liked_by_me") required final bool wasLikedByMe,
}) = _$FeedBlogPostModelImpl;
const factory _FeedBlogPostModel(
{required final int id,
required final String state,
required final String image,
required final String description,
required final Author author,
@JsonKey(name: "video_url") required final String videoUrl,
@JsonKey(name: "created_at", fromJson: parseDate)
required final DateTime createdAt,
@JsonKey(name: "updated_at", fromJson: parseDate)
required final DateTime updatedAt,
required final String title,
@JsonKey(name: "total_likes") required final int totalLikes,
@JsonKey(name: "total_views") required final int totalViews,
@JsonKey(name: "total_comments") required final int totalComments,
@JsonKey(name: "was_liked_by_me") required final bool wasLikedByMe}) =
_$FeedBlogPostModelImpl;
factory _FeedBlogPostModel.fromJson(Map<String, dynamic> json) =
_$FeedBlogPostModelImpl.fromJson;

View File

@@ -7,37 +7,37 @@ part of 'feed_blog_post_model.dart';
// **************************************************************************
_$FeedBlogPostModelImpl _$$FeedBlogPostModelImplFromJson(
Map<String, dynamic> json,
) => _$FeedBlogPostModelImpl(
id: (json['id'] as num).toInt(),
state: json['state'] as String,
image: json['image'] as String,
description: json['description'] as String,
author: Author.fromJson(json['author'] as Map<String, dynamic>),
videoUrl: json['video_url'] as String,
createdAt: parseDate(json['created_at'] as String),
updatedAt: parseDate(json['updated_at'] as String),
title: json['title'] as String,
totalLikes: (json['total_likes'] as num).toInt(),
totalViews: (json['total_views'] as num).toInt(),
totalComments: (json['total_comments'] as num).toInt(),
wasLikedByMe: json['was_liked_by_me'] as bool,
);
Map<String, dynamic> json) =>
_$FeedBlogPostModelImpl(
id: (json['id'] as num).toInt(),
state: json['state'] as String,
image: json['image'] as String,
description: json['description'] as String,
author: Author.fromJson(json['author'] as Map<String, dynamic>),
videoUrl: json['video_url'] as String,
createdAt: parseDate(json['created_at'] as String),
updatedAt: parseDate(json['updated_at'] as String),
title: json['title'] as String,
totalLikes: (json['total_likes'] as num).toInt(),
totalViews: (json['total_views'] as num).toInt(),
totalComments: (json['total_comments'] as num).toInt(),
wasLikedByMe: json['was_liked_by_me'] as bool,
);
Map<String, dynamic> _$$FeedBlogPostModelImplToJson(
_$FeedBlogPostModelImpl instance,
) => <String, dynamic>{
'id': instance.id,
'state': instance.state,
'image': instance.image,
'description': instance.description,
'author': instance.author,
'video_url': instance.videoUrl,
'created_at': instance.createdAt.toIso8601String(),
'updated_at': instance.updatedAt.toIso8601String(),
'title': instance.title,
'total_likes': instance.totalLikes,
'total_views': instance.totalViews,
'total_comments': instance.totalComments,
'was_liked_by_me': instance.wasLikedByMe,
};
_$FeedBlogPostModelImpl instance) =>
<String, dynamic>{
'id': instance.id,
'state': instance.state,
'image': instance.image,
'description': instance.description,
'author': instance.author,
'video_url': instance.videoUrl,
'created_at': instance.createdAt.toIso8601String(),
'updated_at': instance.updatedAt.toIso8601String(),
'title': instance.title,
'total_likes': instance.totalLikes,
'total_views': instance.totalViews,
'total_comments': instance.totalComments,
'was_liked_by_me': instance.wasLikedByMe,
};

View File

@@ -12,12 +12,10 @@ part of 'feed_blog_post_settings_model.dart';
T _$identity<T>(T value) => value;
final _privateConstructorUsedError = UnsupportedError(
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models',
);
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');
FeedBlogPostSettingsModel _$FeedBlogPostSettingsModelFromJson(
Map<String, dynamic> json,
) {
Map<String, dynamic> json) {
return _FeedBlogPostSettingsModel.fromJson(json);
}
@@ -40,24 +38,20 @@ mixin _$FeedBlogPostSettingsModel {
/// @nodoc
abstract class $FeedBlogPostSettingsModelCopyWith<$Res> {
factory $FeedBlogPostSettingsModelCopyWith(
FeedBlogPostSettingsModel value,
$Res Function(FeedBlogPostSettingsModel) then,
) = _$FeedBlogPostSettingsModelCopyWithImpl<$Res, FeedBlogPostSettingsModel>;
factory $FeedBlogPostSettingsModelCopyWith(FeedBlogPostSettingsModel value,
$Res Function(FeedBlogPostSettingsModel) then) =
_$FeedBlogPostSettingsModelCopyWithImpl<$Res, FeedBlogPostSettingsModel>;
@useResult
$Res call({
@JsonKey(name: 'data') List<FeedBlogPostModel> feedBlogPostList,
Meta meta,
});
$Res call(
{@JsonKey(name: 'data') List<FeedBlogPostModel> feedBlogPostList,
Meta meta});
$MetaCopyWith<$Res> get meta;
}
/// @nodoc
class _$FeedBlogPostSettingsModelCopyWithImpl<
$Res,
$Val extends FeedBlogPostSettingsModel
>
class _$FeedBlogPostSettingsModelCopyWithImpl<$Res,
$Val extends FeedBlogPostSettingsModel>
implements $FeedBlogPostSettingsModelCopyWith<$Res> {
_$FeedBlogPostSettingsModelCopyWithImpl(this._value, this._then);
@@ -70,22 +64,20 @@ class _$FeedBlogPostSettingsModelCopyWithImpl<
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({Object? feedBlogPostList = null, Object? meta = null}) {
return _then(
_value.copyWith(
feedBlogPostList:
null == feedBlogPostList
? _value.feedBlogPostList
: feedBlogPostList // ignore: cast_nullable_to_non_nullable
as List<FeedBlogPostModel>,
meta:
null == meta
? _value.meta
: meta // ignore: cast_nullable_to_non_nullable
as Meta,
)
as $Val,
);
$Res call({
Object? feedBlogPostList = null,
Object? meta = null,
}) {
return _then(_value.copyWith(
feedBlogPostList: null == feedBlogPostList
? _value.feedBlogPostList
: feedBlogPostList // ignore: cast_nullable_to_non_nullable
as List<FeedBlogPostModel>,
meta: null == meta
? _value.meta
: meta // ignore: cast_nullable_to_non_nullable
as Meta,
) as $Val);
}
/// Create a copy of FeedBlogPostSettingsModel
@@ -103,15 +95,14 @@ class _$FeedBlogPostSettingsModelCopyWithImpl<
abstract class _$$FeedBlogPostSettingsModelImplCopyWith<$Res>
implements $FeedBlogPostSettingsModelCopyWith<$Res> {
factory _$$FeedBlogPostSettingsModelImplCopyWith(
_$FeedBlogPostSettingsModelImpl value,
$Res Function(_$FeedBlogPostSettingsModelImpl) then,
) = __$$FeedBlogPostSettingsModelImplCopyWithImpl<$Res>;
_$FeedBlogPostSettingsModelImpl value,
$Res Function(_$FeedBlogPostSettingsModelImpl) then) =
__$$FeedBlogPostSettingsModelImplCopyWithImpl<$Res>;
@override
@useResult
$Res call({
@JsonKey(name: 'data') List<FeedBlogPostModel> feedBlogPostList,
Meta meta,
});
$Res call(
{@JsonKey(name: 'data') List<FeedBlogPostModel> feedBlogPostList,
Meta meta});
@override
$MetaCopyWith<$Res> get meta;
@@ -119,47 +110,43 @@ abstract class _$$FeedBlogPostSettingsModelImplCopyWith<$Res>
/// @nodoc
class __$$FeedBlogPostSettingsModelImplCopyWithImpl<$Res>
extends
_$FeedBlogPostSettingsModelCopyWithImpl<
$Res,
_$FeedBlogPostSettingsModelImpl
>
extends _$FeedBlogPostSettingsModelCopyWithImpl<$Res,
_$FeedBlogPostSettingsModelImpl>
implements _$$FeedBlogPostSettingsModelImplCopyWith<$Res> {
__$$FeedBlogPostSettingsModelImplCopyWithImpl(
_$FeedBlogPostSettingsModelImpl _value,
$Res Function(_$FeedBlogPostSettingsModelImpl) _then,
) : super(_value, _then);
_$FeedBlogPostSettingsModelImpl _value,
$Res Function(_$FeedBlogPostSettingsModelImpl) _then)
: super(_value, _then);
/// Create a copy of FeedBlogPostSettingsModel
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({Object? feedBlogPostList = null, Object? meta = null}) {
return _then(
_$FeedBlogPostSettingsModelImpl(
feedBlogPostList:
null == feedBlogPostList
? _value._feedBlogPostList
: feedBlogPostList // ignore: cast_nullable_to_non_nullable
as List<FeedBlogPostModel>,
meta:
null == meta
? _value.meta
: meta // ignore: cast_nullable_to_non_nullable
as Meta,
),
);
$Res call({
Object? feedBlogPostList = null,
Object? meta = null,
}) {
return _then(_$FeedBlogPostSettingsModelImpl(
feedBlogPostList: null == feedBlogPostList
? _value._feedBlogPostList
: feedBlogPostList // ignore: cast_nullable_to_non_nullable
as List<FeedBlogPostModel>,
meta: null == meta
? _value.meta
: meta // ignore: cast_nullable_to_non_nullable
as Meta,
));
}
}
/// @nodoc
@JsonSerializable()
class _$FeedBlogPostSettingsModelImpl implements _FeedBlogPostSettingsModel {
const _$FeedBlogPostSettingsModelImpl({
@JsonKey(name: 'data')
required final List<FeedBlogPostModel> feedBlogPostList,
required this.meta,
}) : _feedBlogPostList = feedBlogPostList;
const _$FeedBlogPostSettingsModelImpl(
{@JsonKey(name: 'data')
required final List<FeedBlogPostModel> feedBlogPostList,
required this.meta})
: _feedBlogPostList = feedBlogPostList;
factory _$FeedBlogPostSettingsModelImpl.fromJson(Map<String, dynamic> json) =>
_$$FeedBlogPostSettingsModelImplFromJson(json);
@@ -187,20 +174,15 @@ 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.
@@ -208,22 +190,22 @@ class _$FeedBlogPostSettingsModelImpl implements _FeedBlogPostSettingsModel {
@override
@pragma('vm:prefer-inline')
_$$FeedBlogPostSettingsModelImplCopyWith<_$FeedBlogPostSettingsModelImpl>
get copyWith => __$$FeedBlogPostSettingsModelImplCopyWithImpl<
_$FeedBlogPostSettingsModelImpl
>(this, _$identity);
get copyWith => __$$FeedBlogPostSettingsModelImplCopyWithImpl<
_$FeedBlogPostSettingsModelImpl>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$$FeedBlogPostSettingsModelImplToJson(this);
return _$$FeedBlogPostSettingsModelImplToJson(
this,
);
}
}
abstract class _FeedBlogPostSettingsModel implements FeedBlogPostSettingsModel {
const factory _FeedBlogPostSettingsModel({
@JsonKey(name: 'data')
required final List<FeedBlogPostModel> feedBlogPostList,
required final Meta meta,
}) = _$FeedBlogPostSettingsModelImpl;
const factory _FeedBlogPostSettingsModel(
{@JsonKey(name: 'data')
required final List<FeedBlogPostModel> feedBlogPostList,
required final Meta meta}) = _$FeedBlogPostSettingsModelImpl;
factory _FeedBlogPostSettingsModel.fromJson(Map<String, dynamic> json) =
_$FeedBlogPostSettingsModelImpl.fromJson;
@@ -239,5 +221,5 @@ abstract class _FeedBlogPostSettingsModel implements FeedBlogPostSettingsModel {
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$FeedBlogPostSettingsModelImplCopyWith<_$FeedBlogPostSettingsModelImpl>
get copyWith => throw _privateConstructorUsedError;
get copyWith => throw _privateConstructorUsedError;
}

View File

@@ -7,18 +7,17 @@ part of 'feed_blog_post_settings_model.dart';
// **************************************************************************
_$FeedBlogPostSettingsModelImpl _$$FeedBlogPostSettingsModelImplFromJson(
Map<String, dynamic> json,
) => _$FeedBlogPostSettingsModelImpl(
feedBlogPostList:
(json['data'] as List<dynamic>)
Map<String, dynamic> json) =>
_$FeedBlogPostSettingsModelImpl(
feedBlogPostList: (json['data'] as List<dynamic>)
.map((e) => FeedBlogPostModel.fromJson(e as Map<String, dynamic>))
.toList(),
meta: Meta.fromJson(json['meta'] as Map<String, dynamic>),
);
meta: Meta.fromJson(json['meta'] as Map<String, dynamic>),
);
Map<String, dynamic> _$$FeedBlogPostSettingsModelImplToJson(
_$FeedBlogPostSettingsModelImpl instance,
) => <String, dynamic>{
'data': instance.feedBlogPostList,
'meta': instance.meta,
};
_$FeedBlogPostSettingsModelImpl instance) =>
<String, dynamic>{
'data': instance.feedBlogPostList,
'meta': instance.meta,
};

View File

@@ -12,12 +12,10 @@ part of 'feed_consultant_model.dart';
T _$identity<T>(T value) => value;
final _privateConstructorUsedError = UnsupportedError(
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models',
);
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');
FeedConsultantPaginationModel _$FeedConsultantPaginationModelFromJson(
Map<String, dynamic> json,
) {
Map<String, dynamic> json) {
return _FeedConsultantPaginationModel.fromJson(json);
}
@@ -34,19 +32,16 @@ mixin _$FeedConsultantPaginationModel {
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$FeedConsultantPaginationModelCopyWith<FeedConsultantPaginationModel>
get copyWith => throw _privateConstructorUsedError;
get copyWith => throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $FeedConsultantPaginationModelCopyWith<$Res> {
factory $FeedConsultantPaginationModelCopyWith(
FeedConsultantPaginationModel value,
$Res Function(FeedConsultantPaginationModel) then,
) =
_$FeedConsultantPaginationModelCopyWithImpl<
$Res,
FeedConsultantPaginationModel
>;
FeedConsultantPaginationModel value,
$Res Function(FeedConsultantPaginationModel) then) =
_$FeedConsultantPaginationModelCopyWithImpl<$Res,
FeedConsultantPaginationModel>;
@useResult
$Res call({List<FeedConsultantModel> data, Links links, Meta meta});
@@ -55,10 +50,8 @@ abstract class $FeedConsultantPaginationModelCopyWith<$Res> {
}
/// @nodoc
class _$FeedConsultantPaginationModelCopyWithImpl<
$Res,
$Val extends FeedConsultantPaginationModel
>
class _$FeedConsultantPaginationModelCopyWithImpl<$Res,
$Val extends FeedConsultantPaginationModel>
implements $FeedConsultantPaginationModelCopyWith<$Res> {
_$FeedConsultantPaginationModelCopyWithImpl(this._value, this._then);
@@ -71,27 +64,25 @@ class _$FeedConsultantPaginationModelCopyWithImpl<
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({Object? data = null, Object? links = null, Object? meta = null}) {
return _then(
_value.copyWith(
data:
null == data
? _value.data
: data // ignore: cast_nullable_to_non_nullable
as List<FeedConsultantModel>,
links:
null == links
? _value.links
: links // ignore: cast_nullable_to_non_nullable
as Links,
meta:
null == meta
? _value.meta
: meta // ignore: cast_nullable_to_non_nullable
as Meta,
)
as $Val,
);
$Res call({
Object? data = null,
Object? links = null,
Object? meta = null,
}) {
return _then(_value.copyWith(
data: null == data
? _value.data
: data // ignore: cast_nullable_to_non_nullable
as List<FeedConsultantModel>,
links: null == links
? _value.links
: links // ignore: cast_nullable_to_non_nullable
as Links,
meta: null == meta
? _value.meta
: meta // ignore: cast_nullable_to_non_nullable
as Meta,
) as $Val);
}
/// Create a copy of FeedConsultantPaginationModel
@@ -119,9 +110,9 @@ class _$FeedConsultantPaginationModelCopyWithImpl<
abstract class _$$FeedConsultantPaginationModelImplCopyWith<$Res>
implements $FeedConsultantPaginationModelCopyWith<$Res> {
factory _$$FeedConsultantPaginationModelImplCopyWith(
_$FeedConsultantPaginationModelImpl value,
$Res Function(_$FeedConsultantPaginationModelImpl) then,
) = __$$FeedConsultantPaginationModelImplCopyWithImpl<$Res>;
_$FeedConsultantPaginationModelImpl value,
$Res Function(_$FeedConsultantPaginationModelImpl) then) =
__$$FeedConsultantPaginationModelImplCopyWithImpl<$Res>;
@override
@useResult
$Res call({List<FeedConsultantModel> data, Links links, Meta meta});
@@ -134,41 +125,37 @@ abstract class _$$FeedConsultantPaginationModelImplCopyWith<$Res>
/// @nodoc
class __$$FeedConsultantPaginationModelImplCopyWithImpl<$Res>
extends
_$FeedConsultantPaginationModelCopyWithImpl<
$Res,
_$FeedConsultantPaginationModelImpl
>
extends _$FeedConsultantPaginationModelCopyWithImpl<$Res,
_$FeedConsultantPaginationModelImpl>
implements _$$FeedConsultantPaginationModelImplCopyWith<$Res> {
__$$FeedConsultantPaginationModelImplCopyWithImpl(
_$FeedConsultantPaginationModelImpl _value,
$Res Function(_$FeedConsultantPaginationModelImpl) _then,
) : super(_value, _then);
_$FeedConsultantPaginationModelImpl _value,
$Res Function(_$FeedConsultantPaginationModelImpl) _then)
: super(_value, _then);
/// Create a copy of FeedConsultantPaginationModel
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({Object? data = null, Object? links = null, Object? meta = null}) {
return _then(
_$FeedConsultantPaginationModelImpl(
data:
null == data
? _value._data
: data // ignore: cast_nullable_to_non_nullable
as List<FeedConsultantModel>,
links:
null == links
? _value.links
: links // ignore: cast_nullable_to_non_nullable
as Links,
meta:
null == meta
? _value.meta
: meta // ignore: cast_nullable_to_non_nullable
as Meta,
),
);
$Res call({
Object? data = null,
Object? links = null,
Object? meta = null,
}) {
return _then(_$FeedConsultantPaginationModelImpl(
data: null == data
? _value._data
: data // ignore: cast_nullable_to_non_nullable
as List<FeedConsultantModel>,
links: null == links
? _value.links
: links // ignore: cast_nullable_to_non_nullable
as Links,
meta: null == meta
? _value.meta
: meta // ignore: cast_nullable_to_non_nullable
as Meta,
));
}
}
@@ -176,15 +163,15 @@ class __$$FeedConsultantPaginationModelImplCopyWithImpl<$Res>
@JsonSerializable()
class _$FeedConsultantPaginationModelImpl
implements _FeedConsultantPaginationModel {
const _$FeedConsultantPaginationModelImpl({
required final List<FeedConsultantModel> data,
required this.links,
required this.meta,
}) : _data = data;
const _$FeedConsultantPaginationModelImpl(
{required final List<FeedConsultantModel> data,
required this.links,
required this.meta})
: _data = data;
factory _$FeedConsultantPaginationModelImpl.fromJson(
Map<String, dynamic> json,
) => _$$FeedConsultantPaginationModelImplFromJson(json);
Map<String, dynamic> json) =>
_$$FeedConsultantPaginationModelImplFromJson(json);
final List<FeedConsultantModel> _data;
@override
@@ -217,11 +204,7 @@ class _$FeedConsultantPaginationModelImpl
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(
runtimeType,
const DeepCollectionEquality().hash(_data),
links,
meta,
);
runtimeType, const DeepCollectionEquality().hash(_data), links, meta);
/// Create a copy of FeedConsultantPaginationModel
/// with the given fields replaced by the non-null parameter values.
@@ -229,25 +212,24 @@ class _$FeedConsultantPaginationModelImpl
@override
@pragma('vm:prefer-inline')
_$$FeedConsultantPaginationModelImplCopyWith<
_$FeedConsultantPaginationModelImpl
>
get copyWith => __$$FeedConsultantPaginationModelImplCopyWithImpl<
_$FeedConsultantPaginationModelImpl
>(this, _$identity);
_$FeedConsultantPaginationModelImpl>
get copyWith => __$$FeedConsultantPaginationModelImplCopyWithImpl<
_$FeedConsultantPaginationModelImpl>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$$FeedConsultantPaginationModelImplToJson(this);
return _$$FeedConsultantPaginationModelImplToJson(
this,
);
}
}
abstract class _FeedConsultantPaginationModel
implements FeedConsultantPaginationModel {
const factory _FeedConsultantPaginationModel({
required final List<FeedConsultantModel> data,
required final Links links,
required final Meta meta,
}) = _$FeedConsultantPaginationModelImpl;
const factory _FeedConsultantPaginationModel(
{required final List<FeedConsultantModel> data,
required final Links links,
required final Meta meta}) = _$FeedConsultantPaginationModelImpl;
factory _FeedConsultantPaginationModel.fromJson(Map<String, dynamic> json) =
_$FeedConsultantPaginationModelImpl.fromJson;
@@ -264,9 +246,8 @@ abstract class _FeedConsultantPaginationModel
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$FeedConsultantPaginationModelImplCopyWith<
_$FeedConsultantPaginationModelImpl
>
get copyWith => throw _privateConstructorUsedError;
_$FeedConsultantPaginationModelImpl>
get copyWith => throw _privateConstructorUsedError;
}
FeedConsultantModel _$FeedConsultantModelFromJson(Map<String, dynamic> json) {
@@ -300,19 +281,17 @@ mixin _$FeedConsultantModel {
/// @nodoc
abstract class $FeedConsultantModelCopyWith<$Res> {
factory $FeedConsultantModelCopyWith(
FeedConsultantModel value,
$Res Function(FeedConsultantModel) then,
) = _$FeedConsultantModelCopyWithImpl<$Res, FeedConsultantModel>;
FeedConsultantModel value, $Res Function(FeedConsultantModel) then) =
_$FeedConsultantModelCopyWithImpl<$Res, FeedConsultantModel>;
@useResult
$Res call({
String slug,
String name,
@JsonKey(name: 'additional_info') String description,
@JsonKey(name: 'rating_place') int? ratingPlace,
@JsonKey(name: 'total_scores') int totalScores,
@JsonKey(name: 'profile_photo_url') String photo,
List<BadgeModel> badges,
});
$Res call(
{String slug,
String name,
@JsonKey(name: 'additional_info') String description,
@JsonKey(name: 'rating_place') int? ratingPlace,
@JsonKey(name: 'total_scores') int totalScores,
@JsonKey(name: 'profile_photo_url') String photo,
List<BadgeModel> badges});
}
/// @nodoc
@@ -338,77 +317,64 @@ class _$FeedConsultantModelCopyWithImpl<$Res, $Val extends FeedConsultantModel>
Object? photo = null,
Object? badges = null,
}) {
return _then(
_value.copyWith(
slug:
null == slug
? _value.slug
: slug // ignore: cast_nullable_to_non_nullable
as String,
name:
null == name
? _value.name
: name // ignore: cast_nullable_to_non_nullable
as String,
description:
null == description
? _value.description
: description // ignore: cast_nullable_to_non_nullable
as String,
ratingPlace:
freezed == ratingPlace
? _value.ratingPlace
: ratingPlace // ignore: cast_nullable_to_non_nullable
as int?,
totalScores:
null == totalScores
? _value.totalScores
: totalScores // ignore: cast_nullable_to_non_nullable
as int,
photo:
null == photo
? _value.photo
: photo // ignore: cast_nullable_to_non_nullable
as String,
badges:
null == badges
? _value.badges
: badges // ignore: cast_nullable_to_non_nullable
as List<BadgeModel>,
)
as $Val,
);
return _then(_value.copyWith(
slug: null == slug
? _value.slug
: slug // ignore: cast_nullable_to_non_nullable
as String,
name: null == name
? _value.name
: name // ignore: cast_nullable_to_non_nullable
as String,
description: null == description
? _value.description
: description // ignore: cast_nullable_to_non_nullable
as String,
ratingPlace: freezed == ratingPlace
? _value.ratingPlace
: ratingPlace // ignore: cast_nullable_to_non_nullable
as int?,
totalScores: null == totalScores
? _value.totalScores
: totalScores // ignore: cast_nullable_to_non_nullable
as int,
photo: null == photo
? _value.photo
: photo // ignore: cast_nullable_to_non_nullable
as String,
badges: null == badges
? _value.badges
: badges // ignore: cast_nullable_to_non_nullable
as List<BadgeModel>,
) as $Val);
}
}
/// @nodoc
abstract class _$$FeedConsultantModelImplCopyWith<$Res>
implements $FeedConsultantModelCopyWith<$Res> {
factory _$$FeedConsultantModelImplCopyWith(
_$FeedConsultantModelImpl value,
$Res Function(_$FeedConsultantModelImpl) then,
) = __$$FeedConsultantModelImplCopyWithImpl<$Res>;
factory _$$FeedConsultantModelImplCopyWith(_$FeedConsultantModelImpl value,
$Res Function(_$FeedConsultantModelImpl) then) =
__$$FeedConsultantModelImplCopyWithImpl<$Res>;
@override
@useResult
$Res call({
String slug,
String name,
@JsonKey(name: 'additional_info') String description,
@JsonKey(name: 'rating_place') int? ratingPlace,
@JsonKey(name: 'total_scores') int totalScores,
@JsonKey(name: 'profile_photo_url') String photo,
List<BadgeModel> badges,
});
$Res call(
{String slug,
String name,
@JsonKey(name: 'additional_info') String description,
@JsonKey(name: 'rating_place') int? ratingPlace,
@JsonKey(name: 'total_scores') int totalScores,
@JsonKey(name: 'profile_photo_url') String photo,
List<BadgeModel> badges});
}
/// @nodoc
class __$$FeedConsultantModelImplCopyWithImpl<$Res>
extends _$FeedConsultantModelCopyWithImpl<$Res, _$FeedConsultantModelImpl>
implements _$$FeedConsultantModelImplCopyWith<$Res> {
__$$FeedConsultantModelImplCopyWithImpl(
_$FeedConsultantModelImpl _value,
$Res Function(_$FeedConsultantModelImpl) _then,
) : super(_value, _then);
__$$FeedConsultantModelImplCopyWithImpl(_$FeedConsultantModelImpl _value,
$Res Function(_$FeedConsultantModelImpl) _then)
: super(_value, _then);
/// Create a copy of FeedConsultantModel
/// with the given fields replaced by the non-null parameter values.
@@ -423,60 +389,51 @@ class __$$FeedConsultantModelImplCopyWithImpl<$Res>
Object? photo = null,
Object? badges = null,
}) {
return _then(
_$FeedConsultantModelImpl(
slug:
null == slug
? _value.slug
: slug // ignore: cast_nullable_to_non_nullable
as String,
name:
null == name
? _value.name
: name // ignore: cast_nullable_to_non_nullable
as String,
description:
null == description
? _value.description
: description // ignore: cast_nullable_to_non_nullable
as String,
ratingPlace:
freezed == ratingPlace
? _value.ratingPlace
: ratingPlace // ignore: cast_nullable_to_non_nullable
as int?,
totalScores:
null == totalScores
? _value.totalScores
: totalScores // ignore: cast_nullable_to_non_nullable
as int,
photo:
null == photo
? _value.photo
: photo // ignore: cast_nullable_to_non_nullable
as String,
badges:
null == badges
? _value._badges
: badges // ignore: cast_nullable_to_non_nullable
as List<BadgeModel>,
),
);
return _then(_$FeedConsultantModelImpl(
slug: null == slug
? _value.slug
: slug // ignore: cast_nullable_to_non_nullable
as String,
name: null == name
? _value.name
: name // ignore: cast_nullable_to_non_nullable
as String,
description: null == description
? _value.description
: description // ignore: cast_nullable_to_non_nullable
as String,
ratingPlace: freezed == ratingPlace
? _value.ratingPlace
: ratingPlace // ignore: cast_nullable_to_non_nullable
as int?,
totalScores: null == totalScores
? _value.totalScores
: totalScores // ignore: cast_nullable_to_non_nullable
as int,
photo: null == photo
? _value.photo
: photo // ignore: cast_nullable_to_non_nullable
as String,
badges: null == badges
? _value._badges
: badges // ignore: cast_nullable_to_non_nullable
as List<BadgeModel>,
));
}
}
/// @nodoc
@JsonSerializable()
class _$FeedConsultantModelImpl implements _FeedConsultantModel {
const _$FeedConsultantModelImpl({
required this.slug,
required this.name,
@JsonKey(name: 'additional_info') required this.description,
@JsonKey(name: 'rating_place') this.ratingPlace,
@JsonKey(name: 'total_scores') required this.totalScores,
@JsonKey(name: 'profile_photo_url') required this.photo,
required final List<BadgeModel> badges,
}) : _badges = badges;
const _$FeedConsultantModelImpl(
{required this.slug,
required this.name,
@JsonKey(name: 'additional_info') required this.description,
@JsonKey(name: 'rating_place') this.ratingPlace,
@JsonKey(name: 'total_scores') required this.totalScores,
@JsonKey(name: 'profile_photo_url') required this.photo,
required final List<BadgeModel> badges})
: _badges = badges;
factory _$FeedConsultantModelImpl.fromJson(Map<String, dynamic> json) =>
_$$FeedConsultantModelImplFromJson(json);
@@ -530,15 +487,14 @@ class _$FeedConsultantModelImpl implements _FeedConsultantModel {
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(
runtimeType,
slug,
name,
description,
ratingPlace,
totalScores,
photo,
const DeepCollectionEquality().hash(_badges),
);
runtimeType,
slug,
name,
description,
ratingPlace,
totalScores,
photo,
const DeepCollectionEquality().hash(_badges));
/// Create a copy of FeedConsultantModel
/// with the given fields replaced by the non-null parameter values.
@@ -547,26 +503,25 @@ class _$FeedConsultantModelImpl implements _FeedConsultantModel {
@pragma('vm:prefer-inline')
_$$FeedConsultantModelImplCopyWith<_$FeedConsultantModelImpl> get copyWith =>
__$$FeedConsultantModelImplCopyWithImpl<_$FeedConsultantModelImpl>(
this,
_$identity,
);
this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$$FeedConsultantModelImplToJson(this);
return _$$FeedConsultantModelImplToJson(
this,
);
}
}
abstract class _FeedConsultantModel implements FeedConsultantModel {
const factory _FeedConsultantModel({
required final String slug,
required final String name,
@JsonKey(name: 'additional_info') required final String description,
@JsonKey(name: 'rating_place') final int? ratingPlace,
@JsonKey(name: 'total_scores') required final int totalScores,
@JsonKey(name: 'profile_photo_url') required final String photo,
required final List<BadgeModel> badges,
}) = _$FeedConsultantModelImpl;
const factory _FeedConsultantModel(
{required final String slug,
required final String name,
@JsonKey(name: 'additional_info') required final String description,
@JsonKey(name: 'rating_place') final int? ratingPlace,
@JsonKey(name: 'total_scores') required final int totalScores,
@JsonKey(name: 'profile_photo_url') required final String photo,
required final List<BadgeModel> badges}) = _$FeedConsultantModelImpl;
factory _FeedConsultantModel.fromJson(Map<String, dynamic> json) =
_$FeedConsultantModelImpl.fromJson;

View File

@@ -7,49 +7,46 @@ part of 'feed_consultant_model.dart';
// **************************************************************************
_$FeedConsultantPaginationModelImpl
_$$FeedConsultantPaginationModelImplFromJson(Map<String, dynamic> json) =>
_$FeedConsultantPaginationModelImpl(
data:
(json['data'] as List<dynamic>)
.map(
(e) => FeedConsultantModel.fromJson(e as Map<String, dynamic>),
)
_$$FeedConsultantPaginationModelImplFromJson(Map<String, dynamic> json) =>
_$FeedConsultantPaginationModelImpl(
data: (json['data'] as List<dynamic>)
.map((e) =>
FeedConsultantModel.fromJson(e as Map<String, dynamic>))
.toList(),
links: Links.fromJson(json['links'] as Map<String, dynamic>),
meta: Meta.fromJson(json['meta'] as Map<String, dynamic>),
);
links: Links.fromJson(json['links'] as Map<String, dynamic>),
meta: Meta.fromJson(json['meta'] as Map<String, dynamic>),
);
Map<String, dynamic> _$$FeedConsultantPaginationModelImplToJson(
_$FeedConsultantPaginationModelImpl instance,
) => <String, dynamic>{
'data': instance.data,
'links': instance.links,
'meta': instance.meta,
};
_$FeedConsultantPaginationModelImpl instance) =>
<String, dynamic>{
'data': instance.data,
'links': instance.links,
'meta': instance.meta,
};
_$FeedConsultantModelImpl _$$FeedConsultantModelImplFromJson(
Map<String, dynamic> json,
) => _$FeedConsultantModelImpl(
slug: json['slug'] as String,
name: json['name'] as String,
description: json['additional_info'] as String,
ratingPlace: (json['rating_place'] as num?)?.toInt(),
totalScores: (json['total_scores'] as num).toInt(),
photo: json['profile_photo_url'] as String,
badges:
(json['badges'] as List<dynamic>)
Map<String, dynamic> json) =>
_$FeedConsultantModelImpl(
slug: json['slug'] as String,
name: json['name'] as String,
description: json['additional_info'] as String,
ratingPlace: (json['rating_place'] as num?)?.toInt(),
totalScores: (json['total_scores'] as num).toInt(),
photo: json['profile_photo_url'] as String,
badges: (json['badges'] as List<dynamic>)
.map((e) => BadgeModel.fromJson(e as Map<String, dynamic>))
.toList(),
);
);
Map<String, dynamic> _$$FeedConsultantModelImplToJson(
_$FeedConsultantModelImpl instance,
) => <String, dynamic>{
'slug': instance.slug,
'name': instance.name,
'additional_info': instance.description,
'rating_place': instance.ratingPlace,
'total_scores': instance.totalScores,
'profile_photo_url': instance.photo,
'badges': instance.badges,
};
_$FeedConsultantModelImpl instance) =>
<String, dynamic>{
'slug': instance.slug,
'name': instance.name,
'additional_info': instance.description,
'rating_place': instance.ratingPlace,
'total_scores': instance.totalScores,
'profile_photo_url': instance.photo,
'badges': instance.badges,
};

View File

@@ -47,7 +47,7 @@ class PlanModel with _$PlanModel {
PlanType planTypeFromJson(dynamic json) {
if (json is List<dynamic>) {
return PlanType(fit: false, slim: false, behavior: false, wellness: false);
return const PlanType(fit: false, slim: false, behavior: false, wellness: false);
}
return PlanType.fromJson(json);
}
@@ -63,7 +63,7 @@ class PacketOptions with _$PacketOptions {
factory PacketOptions.fromJson(Map<String, dynamic> json) => _$PacketOptionsFromJson(json);
factory PacketOptions.empty() => PacketOptions(items: [], price: 1200, short: '', description: '');
factory PacketOptions.empty() => const PacketOptions(items: [], price: 1200, short: '', description: '');
}
@freezed

File diff suppressed because it is too large Load Diff

View File

@@ -7,23 +7,22 @@ part of 'plan_pagination_model.dart';
// **************************************************************************
_$PlanPaginationModelImpl _$$PlanPaginationModelImplFromJson(
Map<String, dynamic> json,
) => _$PlanPaginationModelImpl(
data:
(json['data'] as List<dynamic>)
Map<String, dynamic> json) =>
_$PlanPaginationModelImpl(
data: (json['data'] as List<dynamic>)
.map((e) => PlanModel.fromJson(e as Map<String, dynamic>))
.toList(),
links: Links.fromJson(json['links'] as Map<String, dynamic>),
meta: Meta.fromJson(json['meta'] as Map<String, dynamic>),
);
links: Links.fromJson(json['links'] as Map<String, dynamic>),
meta: Meta.fromJson(json['meta'] as Map<String, dynamic>),
);
Map<String, dynamic> _$$PlanPaginationModelImplToJson(
_$PlanPaginationModelImpl instance,
) => <String, dynamic>{
'data': instance.data,
'links': instance.links,
'meta': instance.meta,
};
_$PlanPaginationModelImpl instance) =>
<String, dynamic>{
'data': instance.data,
'links': instance.links,
'meta': instance.meta,
};
_$PlanModelImpl _$$PlanModelImplFromJson(Map<String, dynamic> json) =>
_$PlanModelImpl(
@@ -36,24 +35,18 @@ _$PlanModelImpl _$$PlanModelImplFromJson(Map<String, dynamic> json) =>
type: planTypeFromJson(json['type']),
details: json['description_md'] as String,
packetsCount: (json['packets_count'] as num).toInt(),
packet1Options:
json['packet1_options'] == null
? null
: PacketOptions.fromJson(
json['packet1_options'] as Map<String, dynamic>,
),
packet2Options:
json['packet2_options'] == null
? null
: PacketOptions.fromJson(
json['packet2_options'] as Map<String, dynamic>,
),
packet3Options:
json['packet3_options'] == null
? null
: PacketOptions.fromJson(
json['packet3_options'] as Map<String, dynamic>,
),
packet1Options: json['packet1_options'] == null
? null
: PacketOptions.fromJson(
json['packet1_options'] as Map<String, dynamic>),
packet2Options: json['packet2_options'] == null
? null
: PacketOptions.fromJson(
json['packet2_options'] as Map<String, dynamic>),
packet3Options: json['packet3_options'] == null
? null
: PacketOptions.fromJson(
json['packet3_options'] as Map<String, dynamic>),
author: Author.fromJson(json['author'] as Map<String, dynamic>),
totalLikes: (json['total_likes'] as num).toInt(),
totalViews: (json['total_views'] as num).toInt(),

File diff suppressed because it is too large Load Diff

View File

@@ -13,15 +13,13 @@ _$RecipesImpl _$$RecipesImplFromJson(Map<String, dynamic> json) =>
state: json['state'] as String,
cookingTime: (json['cooking_time'] as num).toInt(),
activeCookingTime: (json['active_time'] as num).toInt(),
ingredients:
(json['ingredients'] as List<dynamic>?)
?.map((e) => Ingredient.fromJson(e as Map<String, dynamic>))
.toList(),
ingredients: (json['ingredients'] as List<dynamic>?)
?.map((e) => Ingredient.fromJson(e as Map<String, dynamic>))
.toList(),
description: json['description_md'] 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),
@@ -77,9 +75,9 @@ Map<String, dynamic> _$$IngredientImplToJson(_$IngredientImpl instance) =>
};
_$StepImpl _$$StepImplFromJson(Map<String, dynamic> json) => _$StepImpl(
image: json['image'] as String,
description: json['description_md'] as String,
);
image: json['image'] as String,
description: json['description_md'] as String,
);
Map<String, dynamic> _$$StepImplToJson(_$StepImpl instance) =>
<String, dynamic>{

View File

@@ -12,8 +12,7 @@ part of 'recipes_pagination_model.dart';
T _$identity<T>(T value) => value;
final _privateConstructorUsedError = UnsupportedError(
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models',
);
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models');
RecipesPagination _$RecipesPaginationFromJson(Map<String, dynamic> json) {
return _RecipesPagination.fromJson(json);
@@ -37,9 +36,8 @@ mixin _$RecipesPagination {
/// @nodoc
abstract class $RecipesPaginationCopyWith<$Res> {
factory $RecipesPaginationCopyWith(
RecipesPagination value,
$Res Function(RecipesPagination) then,
) = _$RecipesPaginationCopyWithImpl<$Res, RecipesPagination>;
RecipesPagination value, $Res Function(RecipesPagination) then) =
_$RecipesPaginationCopyWithImpl<$Res, RecipesPagination>;
@useResult
$Res call({@JsonKey(name: 'data') List<Recipe> recipesList});
}
@@ -58,27 +56,24 @@ class _$RecipesPaginationCopyWithImpl<$Res, $Val extends RecipesPagination>
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({Object? recipesList = null}) {
return _then(
_value.copyWith(
recipesList:
null == recipesList
? _value.recipesList
: recipesList // ignore: cast_nullable_to_non_nullable
as List<Recipe>,
)
as $Val,
);
$Res call({
Object? recipesList = null,
}) {
return _then(_value.copyWith(
recipesList: null == recipesList
? _value.recipesList
: recipesList // ignore: cast_nullable_to_non_nullable
as List<Recipe>,
) as $Val);
}
}
/// @nodoc
abstract class _$$RecipesPaginationImplCopyWith<$Res>
implements $RecipesPaginationCopyWith<$Res> {
factory _$$RecipesPaginationImplCopyWith(
_$RecipesPaginationImpl value,
$Res Function(_$RecipesPaginationImpl) then,
) = __$$RecipesPaginationImplCopyWithImpl<$Res>;
factory _$$RecipesPaginationImplCopyWith(_$RecipesPaginationImpl value,
$Res Function(_$RecipesPaginationImpl) then) =
__$$RecipesPaginationImplCopyWithImpl<$Res>;
@override
@useResult
$Res call({@JsonKey(name: 'data') List<Recipe> recipesList});
@@ -88,34 +83,32 @@ abstract class _$$RecipesPaginationImplCopyWith<$Res>
class __$$RecipesPaginationImplCopyWithImpl<$Res>
extends _$RecipesPaginationCopyWithImpl<$Res, _$RecipesPaginationImpl>
implements _$$RecipesPaginationImplCopyWith<$Res> {
__$$RecipesPaginationImplCopyWithImpl(
_$RecipesPaginationImpl _value,
$Res Function(_$RecipesPaginationImpl) _then,
) : super(_value, _then);
__$$RecipesPaginationImplCopyWithImpl(_$RecipesPaginationImpl _value,
$Res Function(_$RecipesPaginationImpl) _then)
: super(_value, _then);
/// Create a copy of RecipesPagination
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({Object? recipesList = null}) {
return _then(
_$RecipesPaginationImpl(
recipesList:
null == recipesList
? _value._recipesList
: recipesList // ignore: cast_nullable_to_non_nullable
as List<Recipe>,
),
);
$Res call({
Object? recipesList = null,
}) {
return _then(_$RecipesPaginationImpl(
recipesList: null == recipesList
? _value._recipesList
: recipesList // ignore: cast_nullable_to_non_nullable
as List<Recipe>,
));
}
}
/// @nodoc
@JsonSerializable()
class _$RecipesPaginationImpl implements _RecipesPagination {
const _$RecipesPaginationImpl({
@JsonKey(name: 'data') required final List<Recipe> recipesList,
}) : _recipesList = recipesList;
const _$RecipesPaginationImpl(
{@JsonKey(name: 'data') required final List<Recipe> recipesList})
: _recipesList = recipesList;
factory _$RecipesPaginationImpl.fromJson(Map<String, dynamic> json) =>
_$$RecipesPaginationImplFromJson(json);
@@ -139,18 +132,14 @@ class _$RecipesPaginationImpl implements _RecipesPagination {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$RecipesPaginationImpl &&
const DeepCollectionEquality().equals(
other._recipesList,
_recipesList,
));
const DeepCollectionEquality()
.equals(other._recipesList, _recipesList));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(
runtimeType,
const DeepCollectionEquality().hash(_recipesList),
);
runtimeType, const DeepCollectionEquality().hash(_recipesList));
/// Create a copy of RecipesPagination
/// with the given fields replaced by the non-null parameter values.
@@ -159,20 +148,20 @@ class _$RecipesPaginationImpl implements _RecipesPagination {
@pragma('vm:prefer-inline')
_$$RecipesPaginationImplCopyWith<_$RecipesPaginationImpl> get copyWith =>
__$$RecipesPaginationImplCopyWithImpl<_$RecipesPaginationImpl>(
this,
_$identity,
);
this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$$RecipesPaginationImplToJson(this);
return _$$RecipesPaginationImplToJson(
this,
);
}
}
abstract class _RecipesPagination implements RecipesPagination {
const factory _RecipesPagination({
@JsonKey(name: 'data') required final List<Recipe> recipesList,
}) = _$RecipesPaginationImpl;
const factory _RecipesPagination(
{@JsonKey(name: 'data') required final List<Recipe> recipesList}) =
_$RecipesPaginationImpl;
factory _RecipesPagination.fromJson(Map<String, dynamic> json) =
_$RecipesPaginationImpl.fromJson;

View File

@@ -7,14 +7,15 @@ part of 'recipes_pagination_model.dart';
// **************************************************************************
_$RecipesPaginationImpl _$$RecipesPaginationImplFromJson(
Map<String, dynamic> json,
) => _$RecipesPaginationImpl(
recipesList:
(json['data'] as List<dynamic>)
Map<String, dynamic> json) =>
_$RecipesPaginationImpl(
recipesList: (json['data'] as List<dynamic>)
.map((e) => Recipe.fromJson(e as Map<String, dynamic>))
.toList(),
);
);
Map<String, dynamic> _$$RecipesPaginationImplToJson(
_$RecipesPaginationImpl instance,
) => <String, dynamic>{'data': instance.recipesList};
_$RecipesPaginationImpl instance) =>
<String, dynamic>{
'data': instance.recipesList,
};