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 'badge_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');
BadgeModel _$BadgeModelFromJson(Map<String, dynamic> json) {
return _BadgeModel.fromJson(json);
@@ -40,17 +39,11 @@ mixin _$BadgeModel {
/// @nodoc
abstract class $BadgeModelCopyWith<$Res> {
factory $BadgeModelCopyWith(
BadgeModel value,
$Res Function(BadgeModel) then,
) = _$BadgeModelCopyWithImpl<$Res, BadgeModel>;
BadgeModel value, $Res Function(BadgeModel) then) =
_$BadgeModelCopyWithImpl<$Res, BadgeModel>;
@useResult
$Res call({
int id,
String title,
String description,
String image,
String type,
});
$Res call(
{int id, String title, String description, String image, String type});
}
/// @nodoc
@@ -74,36 +67,28 @@ class _$BadgeModelCopyWithImpl<$Res, $Val extends BadgeModel>
Object? image = null,
Object? type = null,
}) {
return _then(
_value.copyWith(
id:
null == id
? _value.id
: id // ignore: cast_nullable_to_non_nullable
as int,
title:
null == title
? _value.title
: title // ignore: cast_nullable_to_non_nullable
as String,
description:
null == description
? _value.description
: description // ignore: cast_nullable_to_non_nullable
as String,
image:
null == image
? _value.image
: image // ignore: cast_nullable_to_non_nullable
as String,
type:
null == type
? _value.type
: type // ignore: cast_nullable_to_non_nullable
as String,
)
as $Val,
);
return _then(_value.copyWith(
id: null == id
? _value.id
: id // ignore: cast_nullable_to_non_nullable
as int,
title: null == title
? _value.title
: title // ignore: cast_nullable_to_non_nullable
as String,
description: null == description
? _value.description
: description // ignore: cast_nullable_to_non_nullable
as String,
image: null == image
? _value.image
: image // ignore: cast_nullable_to_non_nullable
as String,
type: null == type
? _value.type
: type // ignore: cast_nullable_to_non_nullable
as String,
) as $Val);
}
}
@@ -111,18 +96,12 @@ class _$BadgeModelCopyWithImpl<$Res, $Val extends BadgeModel>
abstract class _$$BadgeModelImplCopyWith<$Res>
implements $BadgeModelCopyWith<$Res> {
factory _$$BadgeModelImplCopyWith(
_$BadgeModelImpl value,
$Res Function(_$BadgeModelImpl) then,
) = __$$BadgeModelImplCopyWithImpl<$Res>;
_$BadgeModelImpl value, $Res Function(_$BadgeModelImpl) then) =
__$$BadgeModelImplCopyWithImpl<$Res>;
@override
@useResult
$Res call({
int id,
String title,
String description,
String image,
String type,
});
$Res call(
{int id, String title, String description, String image, String type});
}
/// @nodoc
@@ -130,9 +109,8 @@ class __$$BadgeModelImplCopyWithImpl<$Res>
extends _$BadgeModelCopyWithImpl<$Res, _$BadgeModelImpl>
implements _$$BadgeModelImplCopyWith<$Res> {
__$$BadgeModelImplCopyWithImpl(
_$BadgeModelImpl _value,
$Res Function(_$BadgeModelImpl) _then,
) : super(_value, _then);
_$BadgeModelImpl _value, $Res Function(_$BadgeModelImpl) _then)
: super(_value, _then);
/// Create a copy of BadgeModel
/// with the given fields replaced by the non-null parameter values.
@@ -145,48 +123,40 @@ class __$$BadgeModelImplCopyWithImpl<$Res>
Object? image = null,
Object? type = null,
}) {
return _then(
_$BadgeModelImpl(
id:
null == id
? _value.id
: id // ignore: cast_nullable_to_non_nullable
as int,
title:
null == title
? _value.title
: title // ignore: cast_nullable_to_non_nullable
as String,
description:
null == description
? _value.description
: description // ignore: cast_nullable_to_non_nullable
as String,
image:
null == image
? _value.image
: image // ignore: cast_nullable_to_non_nullable
as String,
type:
null == type
? _value.type
: type // ignore: cast_nullable_to_non_nullable
as String,
),
);
return _then(_$BadgeModelImpl(
id: null == id
? _value.id
: id // ignore: cast_nullable_to_non_nullable
as int,
title: null == title
? _value.title
: title // ignore: cast_nullable_to_non_nullable
as String,
description: null == description
? _value.description
: description // ignore: cast_nullable_to_non_nullable
as String,
image: null == image
? _value.image
: image // ignore: cast_nullable_to_non_nullable
as String,
type: null == type
? _value.type
: type // ignore: cast_nullable_to_non_nullable
as String,
));
}
}
/// @nodoc
@JsonSerializable()
class _$BadgeModelImpl implements _BadgeModel {
const _$BadgeModelImpl({
required this.id,
required this.title,
required this.description,
required this.image,
required this.type,
});
const _$BadgeModelImpl(
{required this.id,
required this.title,
required this.description,
required this.image,
required this.type});
factory _$BadgeModelImpl.fromJson(Map<String, dynamic> json) =>
_$$BadgeModelImplFromJson(json);
@@ -235,18 +205,19 @@ class _$BadgeModelImpl implements _BadgeModel {
@override
Map<String, dynamic> toJson() {
return _$$BadgeModelImplToJson(this);
return _$$BadgeModelImplToJson(
this,
);
}
}
abstract class _BadgeModel implements BadgeModel {
const factory _BadgeModel({
required final int id,
required final String title,
required final String description,
required final String image,
required final String type,
}) = _$BadgeModelImpl;
const factory _BadgeModel(
{required final int id,
required final String title,
required final String description,
required final String image,
required final String type}) = _$BadgeModelImpl;
factory _BadgeModel.fromJson(Map<String, dynamic> json) =
_$BadgeModelImpl.fromJson;

View File

@@ -12,12 +12,10 @@ part of 'chosen_diets_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');
ChosenDietsPaginationModel _$ChosenDietsPaginationModelFromJson(
Map<String, dynamic> json,
) {
Map<String, dynamic> json) {
return _ChosenDietsPaginationModel.fromJson(json);
}
@@ -33,28 +31,22 @@ mixin _$ChosenDietsPaginationModel {
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$ChosenDietsPaginationModelCopyWith<ChosenDietsPaginationModel>
get copyWith => throw _privateConstructorUsedError;
get copyWith => throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $ChosenDietsPaginationModelCopyWith<$Res> {
factory $ChosenDietsPaginationModelCopyWith(
ChosenDietsPaginationModel value,
$Res Function(ChosenDietsPaginationModel) then,
) =
_$ChosenDietsPaginationModelCopyWithImpl<
$Res,
ChosenDietsPaginationModel
>;
factory $ChosenDietsPaginationModelCopyWith(ChosenDietsPaginationModel value,
$Res Function(ChosenDietsPaginationModel) then) =
_$ChosenDietsPaginationModelCopyWithImpl<$Res,
ChosenDietsPaginationModel>;
@useResult
$Res call({@JsonKey(name: 'data') List<ChosenDietModel> diets});
}
/// @nodoc
class _$ChosenDietsPaginationModelCopyWithImpl<
$Res,
$Val extends ChosenDietsPaginationModel
>
class _$ChosenDietsPaginationModelCopyWithImpl<$Res,
$Val extends ChosenDietsPaginationModel>
implements $ChosenDietsPaginationModelCopyWith<$Res> {
_$ChosenDietsPaginationModelCopyWithImpl(this._value, this._then);
@@ -67,17 +59,15 @@ class _$ChosenDietsPaginationModelCopyWithImpl<
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({Object? diets = null}) {
return _then(
_value.copyWith(
diets:
null == diets
? _value.diets
: diets // ignore: cast_nullable_to_non_nullable
as List<ChosenDietModel>,
)
as $Val,
);
$Res call({
Object? diets = null,
}) {
return _then(_value.copyWith(
diets: null == diets
? _value.diets
: diets // ignore: cast_nullable_to_non_nullable
as List<ChosenDietModel>,
) as $Val);
}
}
@@ -85,9 +75,9 @@ class _$ChosenDietsPaginationModelCopyWithImpl<
abstract class _$$ChosenDietsPaginationModelImplCopyWith<$Res>
implements $ChosenDietsPaginationModelCopyWith<$Res> {
factory _$$ChosenDietsPaginationModelImplCopyWith(
_$ChosenDietsPaginationModelImpl value,
$Res Function(_$ChosenDietsPaginationModelImpl) then,
) = __$$ChosenDietsPaginationModelImplCopyWithImpl<$Res>;
_$ChosenDietsPaginationModelImpl value,
$Res Function(_$ChosenDietsPaginationModelImpl) then) =
__$$ChosenDietsPaginationModelImplCopyWithImpl<$Res>;
@override
@useResult
$Res call({@JsonKey(name: 'data') List<ChosenDietModel> diets});
@@ -95,44 +85,40 @@ abstract class _$$ChosenDietsPaginationModelImplCopyWith<$Res>
/// @nodoc
class __$$ChosenDietsPaginationModelImplCopyWithImpl<$Res>
extends
_$ChosenDietsPaginationModelCopyWithImpl<
$Res,
_$ChosenDietsPaginationModelImpl
>
extends _$ChosenDietsPaginationModelCopyWithImpl<$Res,
_$ChosenDietsPaginationModelImpl>
implements _$$ChosenDietsPaginationModelImplCopyWith<$Res> {
__$$ChosenDietsPaginationModelImplCopyWithImpl(
_$ChosenDietsPaginationModelImpl _value,
$Res Function(_$ChosenDietsPaginationModelImpl) _then,
) : super(_value, _then);
_$ChosenDietsPaginationModelImpl _value,
$Res Function(_$ChosenDietsPaginationModelImpl) _then)
: super(_value, _then);
/// Create a copy of ChosenDietsPaginationModel
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({Object? diets = null}) {
return _then(
_$ChosenDietsPaginationModelImpl(
diets:
null == diets
? _value._diets
: diets // ignore: cast_nullable_to_non_nullable
as List<ChosenDietModel>,
),
);
$Res call({
Object? diets = null,
}) {
return _then(_$ChosenDietsPaginationModelImpl(
diets: null == diets
? _value._diets
: diets // ignore: cast_nullable_to_non_nullable
as List<ChosenDietModel>,
));
}
}
/// @nodoc
@JsonSerializable()
class _$ChosenDietsPaginationModelImpl implements _ChosenDietsPaginationModel {
_$ChosenDietsPaginationModelImpl({
@JsonKey(name: 'data') required final List<ChosenDietModel> diets,
}) : _diets = diets;
_$ChosenDietsPaginationModelImpl(
{@JsonKey(name: 'data') required final List<ChosenDietModel> diets})
: _diets = diets;
factory _$ChosenDietsPaginationModelImpl.fromJson(
Map<String, dynamic> json,
) => _$$ChosenDietsPaginationModelImplFromJson(json);
Map<String, dynamic> json) =>
_$$ChosenDietsPaginationModelImplFromJson(json);
final List<ChosenDietModel> _diets;
@override
@@ -167,21 +153,22 @@ class _$ChosenDietsPaginationModelImpl implements _ChosenDietsPaginationModel {
@override
@pragma('vm:prefer-inline')
_$$ChosenDietsPaginationModelImplCopyWith<_$ChosenDietsPaginationModelImpl>
get copyWith => __$$ChosenDietsPaginationModelImplCopyWithImpl<
_$ChosenDietsPaginationModelImpl
>(this, _$identity);
get copyWith => __$$ChosenDietsPaginationModelImplCopyWithImpl<
_$ChosenDietsPaginationModelImpl>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$$ChosenDietsPaginationModelImplToJson(this);
return _$$ChosenDietsPaginationModelImplToJson(
this,
);
}
}
abstract class _ChosenDietsPaginationModel
implements ChosenDietsPaginationModel {
factory _ChosenDietsPaginationModel({
@JsonKey(name: 'data') required final List<ChosenDietModel> diets,
}) = _$ChosenDietsPaginationModelImpl;
factory _ChosenDietsPaginationModel(
{@JsonKey(name: 'data') required final List<ChosenDietModel> diets}) =
_$ChosenDietsPaginationModelImpl;
factory _ChosenDietsPaginationModel.fromJson(Map<String, dynamic> json) =
_$ChosenDietsPaginationModelImpl.fromJson;
@@ -195,7 +182,7 @@ abstract class _ChosenDietsPaginationModel
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$ChosenDietsPaginationModelImplCopyWith<_$ChosenDietsPaginationModelImpl>
get copyWith => throw _privateConstructorUsedError;
get copyWith => throw _privateConstructorUsedError;
}
ChosenDietModel _$ChosenDietModelFromJson(Map<String, dynamic> json) {
@@ -228,17 +215,15 @@ mixin _$ChosenDietModel {
/// @nodoc
abstract class $ChosenDietModelCopyWith<$Res> {
factory $ChosenDietModelCopyWith(
ChosenDietModel value,
$Res Function(ChosenDietModel) then,
) = _$ChosenDietModelCopyWithImpl<$Res, ChosenDietModel>;
ChosenDietModel value, $Res Function(ChosenDietModel) then) =
_$ChosenDietModelCopyWithImpl<$Res, ChosenDietModel>;
@useResult
$Res call({
@JsonKey(name: 'id') int chosenDietID,
@JsonKey(name: 'chosen_plan_id') int chosenPlanId,
@JsonKey() String state,
@JsonKey(name: 'start_date', fromJson: parseDate) DateTime startDate,
@JsonKey(name: 'diet', fromJson: _parseDietId) int? dietId,
});
$Res call(
{@JsonKey(name: 'id') int chosenDietID,
@JsonKey(name: 'chosen_plan_id') int chosenPlanId,
@JsonKey() String state,
@JsonKey(name: 'start_date', fromJson: parseDate) DateTime startDate,
@JsonKey(name: 'diet', fromJson: _parseDietId) int? dietId});
}
/// @nodoc
@@ -262,55 +247,45 @@ class _$ChosenDietModelCopyWithImpl<$Res, $Val extends ChosenDietModel>
Object? startDate = null,
Object? dietId = freezed,
}) {
return _then(
_value.copyWith(
chosenDietID:
null == chosenDietID
? _value.chosenDietID
: chosenDietID // ignore: cast_nullable_to_non_nullable
as int,
chosenPlanId:
null == chosenPlanId
? _value.chosenPlanId
: chosenPlanId // ignore: cast_nullable_to_non_nullable
as int,
state:
null == state
? _value.state
: state // ignore: cast_nullable_to_non_nullable
as String,
startDate:
null == startDate
? _value.startDate
: startDate // ignore: cast_nullable_to_non_nullable
as DateTime,
dietId:
freezed == dietId
? _value.dietId
: dietId // ignore: cast_nullable_to_non_nullable
as int?,
)
as $Val,
);
return _then(_value.copyWith(
chosenDietID: null == chosenDietID
? _value.chosenDietID
: chosenDietID // ignore: cast_nullable_to_non_nullable
as int,
chosenPlanId: null == chosenPlanId
? _value.chosenPlanId
: chosenPlanId // ignore: cast_nullable_to_non_nullable
as int,
state: null == state
? _value.state
: state // ignore: cast_nullable_to_non_nullable
as String,
startDate: null == startDate
? _value.startDate
: startDate // ignore: cast_nullable_to_non_nullable
as DateTime,
dietId: freezed == dietId
? _value.dietId
: dietId // ignore: cast_nullable_to_non_nullable
as int?,
) as $Val);
}
}
/// @nodoc
abstract class _$$ChosenDietModelImplCopyWith<$Res>
implements $ChosenDietModelCopyWith<$Res> {
factory _$$ChosenDietModelImplCopyWith(
_$ChosenDietModelImpl value,
$Res Function(_$ChosenDietModelImpl) then,
) = __$$ChosenDietModelImplCopyWithImpl<$Res>;
factory _$$ChosenDietModelImplCopyWith(_$ChosenDietModelImpl value,
$Res Function(_$ChosenDietModelImpl) then) =
__$$ChosenDietModelImplCopyWithImpl<$Res>;
@override
@useResult
$Res call({
@JsonKey(name: 'id') int chosenDietID,
@JsonKey(name: 'chosen_plan_id') int chosenPlanId,
@JsonKey() String state,
@JsonKey(name: 'start_date', fromJson: parseDate) DateTime startDate,
@JsonKey(name: 'diet', fromJson: _parseDietId) int? dietId,
});
$Res call(
{@JsonKey(name: 'id') int chosenDietID,
@JsonKey(name: 'chosen_plan_id') int chosenPlanId,
@JsonKey() String state,
@JsonKey(name: 'start_date', fromJson: parseDate) DateTime startDate,
@JsonKey(name: 'diet', fromJson: _parseDietId) int? dietId});
}
/// @nodoc
@@ -318,9 +293,8 @@ class __$$ChosenDietModelImplCopyWithImpl<$Res>
extends _$ChosenDietModelCopyWithImpl<$Res, _$ChosenDietModelImpl>
implements _$$ChosenDietModelImplCopyWith<$Res> {
__$$ChosenDietModelImplCopyWithImpl(
_$ChosenDietModelImpl _value,
$Res Function(_$ChosenDietModelImpl) _then,
) : super(_value, _then);
_$ChosenDietModelImpl _value, $Res Function(_$ChosenDietModelImpl) _then)
: super(_value, _then);
/// Create a copy of ChosenDietModel
/// with the given fields replaced by the non-null parameter values.
@@ -333,48 +307,40 @@ class __$$ChosenDietModelImplCopyWithImpl<$Res>
Object? startDate = null,
Object? dietId = freezed,
}) {
return _then(
_$ChosenDietModelImpl(
chosenDietID:
null == chosenDietID
? _value.chosenDietID
: chosenDietID // ignore: cast_nullable_to_non_nullable
as int,
chosenPlanId:
null == chosenPlanId
? _value.chosenPlanId
: chosenPlanId // ignore: cast_nullable_to_non_nullable
as int,
state:
null == state
? _value.state
: state // ignore: cast_nullable_to_non_nullable
as String,
startDate:
null == startDate
? _value.startDate
: startDate // ignore: cast_nullable_to_non_nullable
as DateTime,
dietId:
freezed == dietId
? _value.dietId
: dietId // ignore: cast_nullable_to_non_nullable
as int?,
),
);
return _then(_$ChosenDietModelImpl(
chosenDietID: null == chosenDietID
? _value.chosenDietID
: chosenDietID // ignore: cast_nullable_to_non_nullable
as int,
chosenPlanId: null == chosenPlanId
? _value.chosenPlanId
: chosenPlanId // ignore: cast_nullable_to_non_nullable
as int,
state: null == state
? _value.state
: state // ignore: cast_nullable_to_non_nullable
as String,
startDate: null == startDate
? _value.startDate
: startDate // ignore: cast_nullable_to_non_nullable
as DateTime,
dietId: freezed == dietId
? _value.dietId
: dietId // ignore: cast_nullable_to_non_nullable
as int?,
));
}
}
/// @nodoc
@JsonSerializable()
class _$ChosenDietModelImpl implements _ChosenDietModel {
_$ChosenDietModelImpl({
@JsonKey(name: 'id') required this.chosenDietID,
@JsonKey(name: 'chosen_plan_id') required this.chosenPlanId,
@JsonKey() required this.state,
@JsonKey(name: 'start_date', fromJson: parseDate) required this.startDate,
@JsonKey(name: 'diet', fromJson: _parseDietId) required this.dietId,
});
_$ChosenDietModelImpl(
{@JsonKey(name: 'id') required this.chosenDietID,
@JsonKey(name: 'chosen_plan_id') required this.chosenPlanId,
@JsonKey() required this.state,
@JsonKey(name: 'start_date', fromJson: parseDate) required this.startDate,
@JsonKey(name: 'diet', fromJson: _parseDietId) required this.dietId});
factory _$ChosenDietModelImpl.fromJson(Map<String, dynamic> json) =>
_$$ChosenDietModelImplFromJson(json);
@@ -418,13 +384,7 @@ class _$ChosenDietModelImpl implements _ChosenDietModel {
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(
runtimeType,
chosenDietID,
chosenPlanId,
state,
startDate,
dietId,
);
runtimeType, chosenDietID, chosenPlanId, state, startDate, dietId);
/// Create a copy of ChosenDietModel
/// with the given fields replaced by the non-null parameter values.
@@ -433,25 +393,25 @@ class _$ChosenDietModelImpl implements _ChosenDietModel {
@pragma('vm:prefer-inline')
_$$ChosenDietModelImplCopyWith<_$ChosenDietModelImpl> get copyWith =>
__$$ChosenDietModelImplCopyWithImpl<_$ChosenDietModelImpl>(
this,
_$identity,
);
this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$$ChosenDietModelImplToJson(this);
return _$$ChosenDietModelImplToJson(
this,
);
}
}
abstract class _ChosenDietModel implements ChosenDietModel {
factory _ChosenDietModel({
@JsonKey(name: 'id') required final int chosenDietID,
@JsonKey(name: 'chosen_plan_id') required final int chosenPlanId,
@JsonKey() required final String state,
@JsonKey(name: 'start_date', fromJson: parseDate)
required final DateTime startDate,
@JsonKey(name: 'diet', fromJson: _parseDietId) required final int? dietId,
}) = _$ChosenDietModelImpl;
factory _ChosenDietModel(
{@JsonKey(name: 'id') required final int chosenDietID,
@JsonKey(name: 'chosen_plan_id') required final int chosenPlanId,
@JsonKey() required final String state,
@JsonKey(name: 'start_date', fromJson: parseDate)
required final DateTime startDate,
@JsonKey(name: 'diet', fromJson: _parseDietId)
required final int? dietId}) = _$ChosenDietModelImpl;
factory _ChosenDietModel.fromJson(Map<String, dynamic> json) =
_$ChosenDietModelImpl.fromJson;

View File

@@ -7,34 +7,35 @@ part of 'chosen_diets_pagination_model.dart';
// **************************************************************************
_$ChosenDietsPaginationModelImpl _$$ChosenDietsPaginationModelImplFromJson(
Map<String, dynamic> json,
) => _$ChosenDietsPaginationModelImpl(
diets:
(json['data'] as List<dynamic>)
Map<String, dynamic> json) =>
_$ChosenDietsPaginationModelImpl(
diets: (json['data'] as List<dynamic>)
.map((e) => ChosenDietModel.fromJson(e as Map<String, dynamic>))
.toList(),
);
);
Map<String, dynamic> _$$ChosenDietsPaginationModelImplToJson(
_$ChosenDietsPaginationModelImpl instance,
) => <String, dynamic>{'data': instance.diets};
_$ChosenDietsPaginationModelImpl instance) =>
<String, dynamic>{
'data': instance.diets,
};
_$ChosenDietModelImpl _$$ChosenDietModelImplFromJson(
Map<String, dynamic> json,
) => _$ChosenDietModelImpl(
chosenDietID: (json['id'] as num).toInt(),
chosenPlanId: (json['chosen_plan_id'] as num).toInt(),
state: json['state'] as String,
startDate: parseDate(json['start_date'] as String),
dietId: _parseDietId(json['diet']),
);
Map<String, dynamic> json) =>
_$ChosenDietModelImpl(
chosenDietID: (json['id'] as num).toInt(),
chosenPlanId: (json['chosen_plan_id'] as num).toInt(),
state: json['state'] as String,
startDate: parseDate(json['start_date'] as String),
dietId: _parseDietId(json['diet']),
);
Map<String, dynamic> _$$ChosenDietModelImplToJson(
_$ChosenDietModelImpl instance,
) => <String, dynamic>{
'id': instance.chosenDietID,
'chosen_plan_id': instance.chosenPlanId,
'state': instance.state,
'start_date': instance.startDate.toIso8601String(),
'diet': instance.dietId,
};
_$ChosenDietModelImpl instance) =>
<String, dynamic>{
'id': instance.chosenDietID,
'chosen_plan_id': instance.chosenPlanId,
'state': instance.state,
'start_date': instance.startDate.toIso8601String(),
'diet': instance.dietId,
};

View File

@@ -12,8 +12,7 @@ part of 'circumference_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');
CircumferenceModel _$CircumferenceModelFromJson(Map<String, dynamic> json) {
return _CircumferenceModel.fromJson(json);
@@ -49,19 +48,17 @@ mixin _$CircumferenceModel {
/// @nodoc
abstract class $CircumferenceModelCopyWith<$Res> {
factory $CircumferenceModelCopyWith(
CircumferenceModel value,
$Res Function(CircumferenceModel) then,
) = _$CircumferenceModelCopyWithImpl<$Res, CircumferenceModel>;
CircumferenceModel value, $Res Function(CircumferenceModel) then) =
_$CircumferenceModelCopyWithImpl<$Res, CircumferenceModel>;
@useResult
$Res call({
@JsonKey(name: "id") int id,
@JsonKey(name: "user_id") int userId,
@JsonKey(name: "chest_circumference") int chestCircumference,
@JsonKey(name: "waist_circumference") int waistCircumference,
@JsonKey(name: "hip_circumference") int hipCircumference,
@JsonKey(name: "created_at") DateTime createdAt,
@JsonKey(name: "updated_at") DateTime updatedAt,
});
$Res call(
{@JsonKey(name: "id") int id,
@JsonKey(name: "user_id") int userId,
@JsonKey(name: "chest_circumference") int chestCircumference,
@JsonKey(name: "waist_circumference") int waistCircumference,
@JsonKey(name: "hip_circumference") int hipCircumference,
@JsonKey(name: "created_at") DateTime createdAt,
@JsonKey(name: "updated_at") DateTime updatedAt});
}
/// @nodoc
@@ -87,77 +84,64 @@ class _$CircumferenceModelCopyWithImpl<$Res, $Val extends CircumferenceModel>
Object? createdAt = null,
Object? updatedAt = null,
}) {
return _then(
_value.copyWith(
id:
null == id
? _value.id
: id // ignore: cast_nullable_to_non_nullable
as int,
userId:
null == userId
? _value.userId
: userId // ignore: cast_nullable_to_non_nullable
as int,
chestCircumference:
null == chestCircumference
? _value.chestCircumference
: chestCircumference // ignore: cast_nullable_to_non_nullable
as int,
waistCircumference:
null == waistCircumference
? _value.waistCircumference
: waistCircumference // ignore: cast_nullable_to_non_nullable
as int,
hipCircumference:
null == hipCircumference
? _value.hipCircumference
: hipCircumference // ignore: cast_nullable_to_non_nullable
as int,
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,
)
as $Val,
);
return _then(_value.copyWith(
id: null == id
? _value.id
: id // ignore: cast_nullable_to_non_nullable
as int,
userId: null == userId
? _value.userId
: userId // ignore: cast_nullable_to_non_nullable
as int,
chestCircumference: null == chestCircumference
? _value.chestCircumference
: chestCircumference // ignore: cast_nullable_to_non_nullable
as int,
waistCircumference: null == waistCircumference
? _value.waistCircumference
: waistCircumference // ignore: cast_nullable_to_non_nullable
as int,
hipCircumference: null == hipCircumference
? _value.hipCircumference
: hipCircumference // ignore: cast_nullable_to_non_nullable
as int,
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,
) as $Val);
}
}
/// @nodoc
abstract class _$$CircumferenceModelImplCopyWith<$Res>
implements $CircumferenceModelCopyWith<$Res> {
factory _$$CircumferenceModelImplCopyWith(
_$CircumferenceModelImpl value,
$Res Function(_$CircumferenceModelImpl) then,
) = __$$CircumferenceModelImplCopyWithImpl<$Res>;
factory _$$CircumferenceModelImplCopyWith(_$CircumferenceModelImpl value,
$Res Function(_$CircumferenceModelImpl) then) =
__$$CircumferenceModelImplCopyWithImpl<$Res>;
@override
@useResult
$Res call({
@JsonKey(name: "id") int id,
@JsonKey(name: "user_id") int userId,
@JsonKey(name: "chest_circumference") int chestCircumference,
@JsonKey(name: "waist_circumference") int waistCircumference,
@JsonKey(name: "hip_circumference") int hipCircumference,
@JsonKey(name: "created_at") DateTime createdAt,
@JsonKey(name: "updated_at") DateTime updatedAt,
});
$Res call(
{@JsonKey(name: "id") int id,
@JsonKey(name: "user_id") int userId,
@JsonKey(name: "chest_circumference") int chestCircumference,
@JsonKey(name: "waist_circumference") int waistCircumference,
@JsonKey(name: "hip_circumference") int hipCircumference,
@JsonKey(name: "created_at") DateTime createdAt,
@JsonKey(name: "updated_at") DateTime updatedAt});
}
/// @nodoc
class __$$CircumferenceModelImplCopyWithImpl<$Res>
extends _$CircumferenceModelCopyWithImpl<$Res, _$CircumferenceModelImpl>
implements _$$CircumferenceModelImplCopyWith<$Res> {
__$$CircumferenceModelImplCopyWithImpl(
_$CircumferenceModelImpl _value,
$Res Function(_$CircumferenceModelImpl) _then,
) : super(_value, _then);
__$$CircumferenceModelImplCopyWithImpl(_$CircumferenceModelImpl _value,
$Res Function(_$CircumferenceModelImpl) _then)
: super(_value, _then);
/// Create a copy of CircumferenceModel
/// with the given fields replaced by the non-null parameter values.
@@ -172,60 +156,50 @@ class __$$CircumferenceModelImplCopyWithImpl<$Res>
Object? createdAt = null,
Object? updatedAt = null,
}) {
return _then(
_$CircumferenceModelImpl(
id:
null == id
? _value.id
: id // ignore: cast_nullable_to_non_nullable
as int,
userId:
null == userId
? _value.userId
: userId // ignore: cast_nullable_to_non_nullable
as int,
chestCircumference:
null == chestCircumference
? _value.chestCircumference
: chestCircumference // ignore: cast_nullable_to_non_nullable
as int,
waistCircumference:
null == waistCircumference
? _value.waistCircumference
: waistCircumference // ignore: cast_nullable_to_non_nullable
as int,
hipCircumference:
null == hipCircumference
? _value.hipCircumference
: hipCircumference // ignore: cast_nullable_to_non_nullable
as int,
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,
),
);
return _then(_$CircumferenceModelImpl(
id: null == id
? _value.id
: id // ignore: cast_nullable_to_non_nullable
as int,
userId: null == userId
? _value.userId
: userId // ignore: cast_nullable_to_non_nullable
as int,
chestCircumference: null == chestCircumference
? _value.chestCircumference
: chestCircumference // ignore: cast_nullable_to_non_nullable
as int,
waistCircumference: null == waistCircumference
? _value.waistCircumference
: waistCircumference // ignore: cast_nullable_to_non_nullable
as int,
hipCircumference: null == hipCircumference
? _value.hipCircumference
: hipCircumference // ignore: cast_nullable_to_non_nullable
as int,
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,
));
}
}
/// @nodoc
@JsonSerializable()
class _$CircumferenceModelImpl implements _CircumferenceModel {
const _$CircumferenceModelImpl({
@JsonKey(name: "id") required this.id,
@JsonKey(name: "user_id") required this.userId,
@JsonKey(name: "chest_circumference") required this.chestCircumference,
@JsonKey(name: "waist_circumference") required this.waistCircumference,
@JsonKey(name: "hip_circumference") required this.hipCircumference,
@JsonKey(name: "created_at") required this.createdAt,
@JsonKey(name: "updated_at") required this.updatedAt,
});
const _$CircumferenceModelImpl(
{@JsonKey(name: "id") required this.id,
@JsonKey(name: "user_id") required this.userId,
@JsonKey(name: "chest_circumference") required this.chestCircumference,
@JsonKey(name: "waist_circumference") required this.waistCircumference,
@JsonKey(name: "hip_circumference") required this.hipCircumference,
@JsonKey(name: "created_at") required this.createdAt,
@JsonKey(name: "updated_at") required this.updatedAt});
factory _$CircumferenceModelImpl.fromJson(Map<String, dynamic> json) =>
_$$CircumferenceModelImplFromJson(json);
@@ -278,16 +252,8 @@ class _$CircumferenceModelImpl implements _CircumferenceModel {
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(
runtimeType,
id,
userId,
chestCircumference,
waistCircumference,
hipCircumference,
createdAt,
updatedAt,
);
int get hashCode => Object.hash(runtimeType, id, userId, chestCircumference,
waistCircumference, hipCircumference, createdAt, updatedAt);
/// Create a copy of CircumferenceModel
/// with the given fields replaced by the non-null parameter values.
@@ -296,26 +262,28 @@ class _$CircumferenceModelImpl implements _CircumferenceModel {
@pragma('vm:prefer-inline')
_$$CircumferenceModelImplCopyWith<_$CircumferenceModelImpl> get copyWith =>
__$$CircumferenceModelImplCopyWithImpl<_$CircumferenceModelImpl>(
this,
_$identity,
);
this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$$CircumferenceModelImplToJson(this);
return _$$CircumferenceModelImplToJson(
this,
);
}
}
abstract class _CircumferenceModel implements CircumferenceModel {
const factory _CircumferenceModel({
@JsonKey(name: "id") required final int id,
@JsonKey(name: "user_id") required final int userId,
@JsonKey(name: "chest_circumference") required final int chestCircumference,
@JsonKey(name: "waist_circumference") required final int waistCircumference,
@JsonKey(name: "hip_circumference") required final int hipCircumference,
@JsonKey(name: "created_at") required final DateTime createdAt,
@JsonKey(name: "updated_at") required final DateTime updatedAt,
}) = _$CircumferenceModelImpl;
const factory _CircumferenceModel(
{@JsonKey(name: "id") required final int id,
@JsonKey(name: "user_id") required final int userId,
@JsonKey(name: "chest_circumference")
required final int chestCircumference,
@JsonKey(name: "waist_circumference")
required final int waistCircumference,
@JsonKey(name: "hip_circumference") required final int hipCircumference,
@JsonKey(name: "created_at") required final DateTime createdAt,
@JsonKey(name: "updated_at")
required final DateTime updatedAt}) = _$CircumferenceModelImpl;
factory _CircumferenceModel.fromJson(Map<String, dynamic> json) =
_$CircumferenceModelImpl.fromJson;

View File

@@ -7,25 +7,25 @@ part of 'circumference_model.dart';
// **************************************************************************
_$CircumferenceModelImpl _$$CircumferenceModelImplFromJson(
Map<String, dynamic> json,
) => _$CircumferenceModelImpl(
id: (json['id'] as num).toInt(),
userId: (json['user_id'] as num).toInt(),
chestCircumference: (json['chest_circumference'] as num).toInt(),
waistCircumference: (json['waist_circumference'] as num).toInt(),
hipCircumference: (json['hip_circumference'] as num).toInt(),
createdAt: DateTime.parse(json['created_at'] as String),
updatedAt: DateTime.parse(json['updated_at'] as String),
);
Map<String, dynamic> json) =>
_$CircumferenceModelImpl(
id: (json['id'] as num).toInt(),
userId: (json['user_id'] as num).toInt(),
chestCircumference: (json['chest_circumference'] as num).toInt(),
waistCircumference: (json['waist_circumference'] as num).toInt(),
hipCircumference: (json['hip_circumference'] as num).toInt(),
createdAt: DateTime.parse(json['created_at'] as String),
updatedAt: DateTime.parse(json['updated_at'] as String),
);
Map<String, dynamic> _$$CircumferenceModelImplToJson(
_$CircumferenceModelImpl instance,
) => <String, dynamic>{
'id': instance.id,
'user_id': instance.userId,
'chest_circumference': instance.chestCircumference,
'waist_circumference': instance.waistCircumference,
'hip_circumference': instance.hipCircumference,
'created_at': instance.createdAt.toIso8601String(),
'updated_at': instance.updatedAt.toIso8601String(),
};
_$CircumferenceModelImpl instance) =>
<String, dynamic>{
'id': instance.id,
'user_id': instance.userId,
'chest_circumference': instance.chestCircumference,
'waist_circumference': instance.waistCircumference,
'hip_circumference': instance.hipCircumference,
'created_at': instance.createdAt.toIso8601String(),
'updated_at': instance.updatedAt.toIso8601String(),
};

View File

@@ -1,3 +1,4 @@
import 'package:eatvio_app/features/my_finance/models/card_model.dart';
import 'package:eatvio_app/features/profile/models/badge_model.dart';
import 'package:freezed_annotation/freezed_annotation.dart';
@@ -14,7 +15,7 @@ class ProfileModel with _$ProfileModel {
@JsonKey(name: "email_verified_at") DateTime? emailVerifiedAt,
@JsonKey(name: "created_at") DateTime? createdAt,
@JsonKey(name: "updated_at") DateTime? updatedAt,
@JsonKey(name: "is_public_profile") required bool isPublicProfile,
@JsonKey(name: "is_public_profile", fromJson: parseBool) required bool isPublicProfile,
@JsonKey(name: 'is_entity_subscribed_by_me') required bool isEntitySubscribedByMe,
@JsonKey(name: "slug") required String slug,
@JsonKey(name: "profile_photo_url") required String profilePhotoUrl,

File diff suppressed because it is too large Load Diff

View File

@@ -6,57 +6,44 @@ part of 'profile_model.dart';
// JsonSerializableGenerator
// **************************************************************************
_$ProfileModelImpl _$$ProfileModelImplFromJson(
Map<String, dynamic> json,
) => _$ProfileModelImpl(
id: (json['id'] as num).toInt(),
name: json['name'] as String,
email: json['email'] as String,
ratingPlace: (json['rating_place'] as num?)?.toInt(),
emailVerifiedAt:
json['email_verified_at'] == null
_$ProfileModelImpl _$$ProfileModelImplFromJson(Map<String, dynamic> json) =>
_$ProfileModelImpl(
id: (json['id'] as num).toInt(),
name: json['name'] as String,
email: json['email'] as String,
ratingPlace: (json['rating_place'] as num?)?.toInt(),
emailVerifiedAt: json['email_verified_at'] == null
? null
: DateTime.parse(json['email_verified_at'] as String),
createdAt:
json['created_at'] == null
createdAt: json['created_at'] == null
? null
: DateTime.parse(json['created_at'] as String),
updatedAt:
json['updated_at'] == null
updatedAt: json['updated_at'] == null
? null
: DateTime.parse(json['updated_at'] as String),
isPublicProfile: json['is_public_profile'] as bool,
isEntitySubscribedByMe: json['is_entity_subscribed_by_me'] as bool,
slug: json['slug'] as String,
profilePhotoUrl: json['profile_photo_url'] as String,
roles: (json['roles'] as List<dynamic>).map((e) => e as String).toList(),
badges:
(json['badges'] as List<dynamic>)
isPublicProfile: parseBool(json['is_public_profile']),
isEntitySubscribedByMe: json['is_entity_subscribed_by_me'] as bool,
slug: json['slug'] as String,
profilePhotoUrl: json['profile_photo_url'] as String,
roles: (json['roles'] as List<dynamic>).map((e) => e as String).toList(),
badges: (json['badges'] as List<dynamic>)
.map((e) => BadgeModel.fromJson(e as Map<String, dynamic>))
.toList(),
subscriptions:
(json['subscriptions'] as List<dynamic>)
subscriptions: (json['subscriptions'] as List<dynamic>)
.map((e) => ProfilePreviewModel.fromJson(e as Map<String, dynamic>))
.toList(),
subscribers:
(json['subscribers'] as List<dynamic>)
subscribers: (json['subscribers'] as List<dynamic>)
.map((e) => ProfilePreviewModel.fromJson(e as Map<String, dynamic>))
.toList(),
educationResource:
json['education_resource'] == null
educationResource: json['education_resource'] == null
? null
: EducationModel.fromJson(
json['education_resource'] as Map<String, dynamic>,
),
diplomasAndCertificates:
(json['cert_photos'] as List<dynamic>?)
?.map(
(e) => DiplomasAndCertificatesModel.fromJson(
e as Map<String, dynamic>,
),
)
json['education_resource'] as Map<String, dynamic>),
diplomasAndCertificates: (json['cert_photos'] as List<dynamic>?)
?.map((e) =>
DiplomasAndCertificatesModel.fromJson(e as Map<String, dynamic>))
.toList(),
);
);
Map<String, dynamic> _$$ProfileModelImplToJson(_$ProfileModelImpl instance) =>
<String, dynamic>{
@@ -80,30 +67,28 @@ Map<String, dynamic> _$$ProfileModelImplToJson(_$ProfileModelImpl instance) =>
};
_$DiplomasAndCertificatesModelImpl _$$DiplomasAndCertificatesModelImplFromJson(
Map<String, dynamic> json,
) => _$DiplomasAndCertificatesModelImpl(
id: (json['id'] as num).toInt(),
path: json['path'] as String,
);
Map<String, dynamic> json) =>
_$DiplomasAndCertificatesModelImpl(
id: (json['id'] as num).toInt(),
path: json['path'] as String,
);
Map<String, dynamic> _$$DiplomasAndCertificatesModelImplToJson(
_$DiplomasAndCertificatesModelImpl instance,
) => <String, dynamic>{'id': instance.id, 'path': instance.path};
_$DiplomasAndCertificatesModelImpl instance) =>
<String, dynamic>{
'id': instance.id,
'path': instance.path,
};
_$EducationModelImpl _$$EducationModelImplFromJson(Map<String, dynamic> json) =>
_$EducationModelImpl(
hasMedicalEducation: (json['has_medical_education'] as num?)?.toInt(),
completedCourses:
(json['completed_cources'] as List<dynamic>?)
?.map(
(e) => (e as Map<String, dynamic>).map(
(k, e) => MapEntry(
k,
CompletedCoursesModel.fromJson(e as Map<String, dynamic>),
),
),
)
.toList(),
completedCourses: (json['completed_cources'] as List<dynamic>?)
?.map((e) => (e as Map<String, dynamic>).map(
(k, e) => MapEntry(k,
CompletedCoursesModel.fromJson(e as Map<String, dynamic>)),
))
.toList(),
vkLink: json['vk_link'] as String?,
instaLink: json['insta_link'] as String?,
fbLink: json['fb_link'] as String?,
@@ -113,105 +98,108 @@ _$EducationModelImpl _$$EducationModelImplFromJson(Map<String, dynamic> json) =>
);
Map<String, dynamic> _$$EducationModelImplToJson(
_$EducationModelImpl instance,
) => <String, dynamic>{
'has_medical_education': instance.hasMedicalEducation,
'completed_cources': instance.completedCourses,
'vk_link': instance.vkLink,
'insta_link': instance.instaLink,
'fb_link': instance.fbLink,
'tg_link': instance.tgLink,
'personal_site_link': instance.personalSiteLink,
'request_state': instance.requestState,
};
_$EducationModelImpl instance) =>
<String, dynamic>{
'has_medical_education': instance.hasMedicalEducation,
'completed_cources': instance.completedCourses,
'vk_link': instance.vkLink,
'insta_link': instance.instaLink,
'fb_link': instance.fbLink,
'tg_link': instance.tgLink,
'personal_site_link': instance.personalSiteLink,
'request_state': instance.requestState,
};
_$CompletedCoursesModelImpl _$$CompletedCoursesModelImplFromJson(
Map<String, dynamic> json,
) => _$CompletedCoursesModelImpl(
date: json['date'] as String,
title: json['title'] as String,
);
Map<String, dynamic> json) =>
_$CompletedCoursesModelImpl(
date: json['date'] as String,
title: json['title'] as String,
);
Map<String, dynamic> _$$CompletedCoursesModelImplToJson(
_$CompletedCoursesModelImpl instance,
) => <String, dynamic>{'date': instance.date, 'title': instance.title};
_$CompletedCoursesModelImpl instance) =>
<String, dynamic>{
'date': instance.date,
'title': instance.title,
};
_$ProfileDetailsModelImpl _$$ProfileDetailsModelImplFromJson(
Map<String, dynamic> json,
) => _$ProfileDetailsModelImpl(
firstName: json['first_name'] as String,
lastName: json['last_name'] as String,
birthdate: json['birthdate'] as String,
gender: json['gender'] as String,
country: json['country'] as String,
city: json['city'] as String,
lang: json['lang'] as String,
weight: (json['weight'] as num).toDouble(),
height: (json['height'] as num).toInt(),
chestCircumference: (json['chest_circumference'] as num).toInt(),
waistCircumference: (json['waist_circumference'] as num).toInt(),
hipCircumference: (json['hip_circumference'] as num).toInt(),
bloodPressureUp: (json['blood_pressure_up'] as num).toInt(),
bloodPressureDown: (json['blood_pressure_down'] as num).toInt(),
hasHypo: json['has_hypo'] as bool,
hasHyper: json['has_hyper'] as bool,
aboutAlergy: json['about_alergy'] as String,
aboutTakingPils: json['about_taking_pils'] as String,
aboutSportHobbies: json['about_sport_hobbies'] as String,
favoriteFoods: json['favorite_foods'] as String,
unfavoriteFoods: json['unfavorite_foods'] as String,
additionalInfo: json['additional_info'] as String,
createdAt:
json['created_at'] == null
Map<String, dynamic> json) =>
_$ProfileDetailsModelImpl(
firstName: json['first_name'] as String,
lastName: json['last_name'] as String,
birthdate: json['birthdate'] as String,
gender: json['gender'] as String,
country: json['country'] as String,
city: json['city'] as String,
lang: json['lang'] as String,
weight: (json['weight'] as num).toDouble(),
height: (json['height'] as num).toInt(),
chestCircumference: (json['chest_circumference'] as num).toInt(),
waistCircumference: (json['waist_circumference'] as num).toInt(),
hipCircumference: (json['hip_circumference'] as num).toInt(),
bloodPressureUp: (json['blood_pressure_up'] as num).toInt(),
bloodPressureDown: (json['blood_pressure_down'] as num).toInt(),
hasHypo: json['has_hypo'] as bool,
hasHyper: json['has_hyper'] as bool,
aboutAlergy: json['about_alergy'] as String,
aboutTakingPils: json['about_taking_pils'] as String,
aboutSportHobbies: json['about_sport_hobbies'] as String,
favoriteFoods: json['favorite_foods'] as String,
unfavoriteFoods: json['unfavorite_foods'] as String,
additionalInfo: json['additional_info'] as String,
createdAt: json['created_at'] == null
? null
: DateTime.parse(json['created_at'] as String),
updatedAt:
json['updated_at'] == null
updatedAt: json['updated_at'] == null
? null
: DateTime.parse(json['updated_at'] as String),
isMoodFillable: json['is_mood_fillable'] as bool,
isBedtimeFillable: json['is_bedtime_fillable'] as bool,
activityCoefficient: (json['activity_coefficient'] as num).toDouble(),
);
isMoodFillable: json['is_mood_fillable'] as bool,
isBedtimeFillable: json['is_bedtime_fillable'] as bool,
activityCoefficient: (json['activity_coefficient'] as num).toDouble(),
);
Map<String, dynamic> _$$ProfileDetailsModelImplToJson(
_$ProfileDetailsModelImpl instance,
) => <String, dynamic>{
'first_name': instance.firstName,
'last_name': instance.lastName,
'birthdate': instance.birthdate,
'gender': instance.gender,
'country': instance.country,
'city': instance.city,
'lang': instance.lang,
'weight': instance.weight,
'height': instance.height,
'chest_circumference': instance.chestCircumference,
'waist_circumference': instance.waistCircumference,
'hip_circumference': instance.hipCircumference,
'blood_pressure_up': instance.bloodPressureUp,
'blood_pressure_down': instance.bloodPressureDown,
'has_hypo': instance.hasHypo,
'has_hyper': instance.hasHyper,
'about_alergy': instance.aboutAlergy,
'about_taking_pils': instance.aboutTakingPils,
'about_sport_hobbies': instance.aboutSportHobbies,
'favorite_foods': instance.favoriteFoods,
'unfavorite_foods': instance.unfavoriteFoods,
'additional_info': instance.additionalInfo,
'created_at': instance.createdAt?.toIso8601String(),
'updated_at': instance.updatedAt?.toIso8601String(),
'is_mood_fillable': instance.isMoodFillable,
'is_bedtime_fillable': instance.isBedtimeFillable,
'activity_coefficient': instance.activityCoefficient,
};
_$ProfileDetailsModelImpl instance) =>
<String, dynamic>{
'first_name': instance.firstName,
'last_name': instance.lastName,
'birthdate': instance.birthdate,
'gender': instance.gender,
'country': instance.country,
'city': instance.city,
'lang': instance.lang,
'weight': instance.weight,
'height': instance.height,
'chest_circumference': instance.chestCircumference,
'waist_circumference': instance.waistCircumference,
'hip_circumference': instance.hipCircumference,
'blood_pressure_up': instance.bloodPressureUp,
'blood_pressure_down': instance.bloodPressureDown,
'has_hypo': instance.hasHypo,
'has_hyper': instance.hasHyper,
'about_alergy': instance.aboutAlergy,
'about_taking_pils': instance.aboutTakingPils,
'about_sport_hobbies': instance.aboutSportHobbies,
'favorite_foods': instance.favoriteFoods,
'unfavorite_foods': instance.unfavoriteFoods,
'additional_info': instance.additionalInfo,
'created_at': instance.createdAt?.toIso8601String(),
'updated_at': instance.updatedAt?.toIso8601String(),
'is_mood_fillable': instance.isMoodFillable,
'is_bedtime_fillable': instance.isBedtimeFillable,
'activity_coefficient': instance.activityCoefficient,
};
_$ProfilePreviewModelImpl _$$ProfilePreviewModelImplFromJson(
Map<String, dynamic> json,
) => _$ProfilePreviewModelImpl(
profilePhotoUrl: json['profile_photo_url'] as String,
);
Map<String, dynamic> json) =>
_$ProfilePreviewModelImpl(
profilePhotoUrl: json['profile_photo_url'] as String,
);
Map<String, dynamic> _$$ProfilePreviewModelImplToJson(
_$ProfilePreviewModelImpl instance,
) => <String, dynamic>{'profile_photo_url': instance.profilePhotoUrl};
_$ProfilePreviewModelImpl instance) =>
<String, dynamic>{
'profile_photo_url': instance.profilePhotoUrl,
};

View File

@@ -12,8 +12,7 @@ part of 'sub_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');
SubPaginationModel _$SubPaginationModelFromJson(Map<String, dynamic> json) {
return _SubPaginationModel.fromJson(json);
@@ -38,9 +37,8 @@ mixin _$SubPaginationModel {
/// @nodoc
abstract class $SubPaginationModelCopyWith<$Res> {
factory $SubPaginationModelCopyWith(
SubPaginationModel value,
$Res Function(SubPaginationModel) then,
) = _$SubPaginationModelCopyWithImpl<$Res, SubPaginationModel>;
SubPaginationModel value, $Res Function(SubPaginationModel) then) =
_$SubPaginationModelCopyWithImpl<$Res, SubPaginationModel>;
@useResult
$Res call({List<SubModel> data, Links links, Meta meta});
@@ -62,27 +60,25 @@ class _$SubPaginationModelCopyWithImpl<$Res, $Val extends SubPaginationModel>
/// 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<SubModel>,
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<SubModel>,
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 SubPaginationModel
@@ -109,10 +105,9 @@ class _$SubPaginationModelCopyWithImpl<$Res, $Val extends SubPaginationModel>
/// @nodoc
abstract class _$$SubPaginationModelImplCopyWith<$Res>
implements $SubPaginationModelCopyWith<$Res> {
factory _$$SubPaginationModelImplCopyWith(
_$SubPaginationModelImpl value,
$Res Function(_$SubPaginationModelImpl) then,
) = __$$SubPaginationModelImplCopyWithImpl<$Res>;
factory _$$SubPaginationModelImplCopyWith(_$SubPaginationModelImpl value,
$Res Function(_$SubPaginationModelImpl) then) =
__$$SubPaginationModelImplCopyWithImpl<$Res>;
@override
@useResult
$Res call({List<SubModel> data, Links links, Meta meta});
@@ -127,46 +122,44 @@ abstract class _$$SubPaginationModelImplCopyWith<$Res>
class __$$SubPaginationModelImplCopyWithImpl<$Res>
extends _$SubPaginationModelCopyWithImpl<$Res, _$SubPaginationModelImpl>
implements _$$SubPaginationModelImplCopyWith<$Res> {
__$$SubPaginationModelImplCopyWithImpl(
_$SubPaginationModelImpl _value,
$Res Function(_$SubPaginationModelImpl) _then,
) : super(_value, _then);
__$$SubPaginationModelImplCopyWithImpl(_$SubPaginationModelImpl _value,
$Res Function(_$SubPaginationModelImpl) _then)
: super(_value, _then);
/// Create a copy of SubPaginationModel
/// 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(
_$SubPaginationModelImpl(
data:
null == data
? _value._data
: data // ignore: cast_nullable_to_non_nullable
as List<SubModel>,
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(_$SubPaginationModelImpl(
data: null == data
? _value._data
: data // ignore: cast_nullable_to_non_nullable
as List<SubModel>,
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 _$SubPaginationModelImpl implements _SubPaginationModel {
const _$SubPaginationModelImpl({
required final List<SubModel> data,
required this.links,
required this.meta,
}) : _data = data;
const _$SubPaginationModelImpl(
{required final List<SubModel> data,
required this.links,
required this.meta})
: _data = data;
factory _$SubPaginationModelImpl.fromJson(Map<String, dynamic> json) =>
_$$SubPaginationModelImplFromJson(json);
@@ -202,11 +195,7 @@ class _$SubPaginationModelImpl implements _SubPaginationModel {
@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 SubPaginationModel
/// with the given fields replaced by the non-null parameter values.
@@ -215,22 +204,21 @@ class _$SubPaginationModelImpl implements _SubPaginationModel {
@pragma('vm:prefer-inline')
_$$SubPaginationModelImplCopyWith<_$SubPaginationModelImpl> get copyWith =>
__$$SubPaginationModelImplCopyWithImpl<_$SubPaginationModelImpl>(
this,
_$identity,
);
this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$$SubPaginationModelImplToJson(this);
return _$$SubPaginationModelImplToJson(
this,
);
}
}
abstract class _SubPaginationModel implements SubPaginationModel {
const factory _SubPaginationModel({
required final List<SubModel> data,
required final Links links,
required final Meta meta,
}) = _$SubPaginationModelImpl;
const factory _SubPaginationModel(
{required final List<SubModel> data,
required final Links links,
required final Meta meta}) = _$SubPaginationModelImpl;
factory _SubPaginationModel.fromJson(Map<String, dynamic> json) =
_$SubPaginationModelImpl.fromJson;
@@ -289,20 +277,19 @@ abstract class $SubModelCopyWith<$Res> {
factory $SubModelCopyWith(SubModel value, $Res Function(SubModel) then) =
_$SubModelCopyWithImpl<$Res, SubModel>;
@useResult
$Res call({
int id,
String slug,
String name,
String city,
DateTime birthdate,
@JsonKey(name: 'is_entity_subscribed_by_me') bool isEntitySubscribedByMe,
String email,
@JsonKey(name: 'profile_photo_url') String profilePhotoUrl,
String role,
@JsonKey(name: 'is_public_profile') bool isPublicProfile,
@JsonKey(name: 'created_at') DateTime createdAt,
@JsonKey(name: 'updated_at') DateTime updatedAt,
});
$Res call(
{int id,
String slug,
String name,
String city,
DateTime birthdate,
@JsonKey(name: 'is_entity_subscribed_by_me') bool isEntitySubscribedByMe,
String email,
@JsonKey(name: 'profile_photo_url') String profilePhotoUrl,
String role,
@JsonKey(name: 'is_public_profile') bool isPublicProfile,
@JsonKey(name: 'created_at') DateTime createdAt,
@JsonKey(name: 'updated_at') DateTime updatedAt});
}
/// @nodoc
@@ -333,71 +320,56 @@ class _$SubModelCopyWithImpl<$Res, $Val extends SubModel>
Object? createdAt = null,
Object? updatedAt = null,
}) {
return _then(
_value.copyWith(
id:
null == id
? _value.id
: id // ignore: cast_nullable_to_non_nullable
as int,
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,
city:
null == city
? _value.city
: city // ignore: cast_nullable_to_non_nullable
as String,
birthdate:
null == birthdate
? _value.birthdate
: birthdate // ignore: cast_nullable_to_non_nullable
as DateTime,
isEntitySubscribedByMe:
null == isEntitySubscribedByMe
? _value.isEntitySubscribedByMe
: isEntitySubscribedByMe // ignore: cast_nullable_to_non_nullable
as bool,
email:
null == email
? _value.email
: email // ignore: cast_nullable_to_non_nullable
as String,
profilePhotoUrl:
null == profilePhotoUrl
? _value.profilePhotoUrl
: profilePhotoUrl // ignore: cast_nullable_to_non_nullable
as String,
role:
null == role
? _value.role
: role // ignore: cast_nullable_to_non_nullable
as String,
isPublicProfile:
null == isPublicProfile
? _value.isPublicProfile
: isPublicProfile // ignore: cast_nullable_to_non_nullable
as bool,
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,
)
as $Val,
);
return _then(_value.copyWith(
id: null == id
? _value.id
: id // ignore: cast_nullable_to_non_nullable
as int,
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,
city: null == city
? _value.city
: city // ignore: cast_nullable_to_non_nullable
as String,
birthdate: null == birthdate
? _value.birthdate
: birthdate // ignore: cast_nullable_to_non_nullable
as DateTime,
isEntitySubscribedByMe: null == isEntitySubscribedByMe
? _value.isEntitySubscribedByMe
: isEntitySubscribedByMe // ignore: cast_nullable_to_non_nullable
as bool,
email: null == email
? _value.email
: email // ignore: cast_nullable_to_non_nullable
as String,
profilePhotoUrl: null == profilePhotoUrl
? _value.profilePhotoUrl
: profilePhotoUrl // ignore: cast_nullable_to_non_nullable
as String,
role: null == role
? _value.role
: role // ignore: cast_nullable_to_non_nullable
as String,
isPublicProfile: null == isPublicProfile
? _value.isPublicProfile
: isPublicProfile // ignore: cast_nullable_to_non_nullable
as bool,
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,
) as $Val);
}
}
@@ -405,25 +377,23 @@ class _$SubModelCopyWithImpl<$Res, $Val extends SubModel>
abstract class _$$SubModelImplCopyWith<$Res>
implements $SubModelCopyWith<$Res> {
factory _$$SubModelImplCopyWith(
_$SubModelImpl value,
$Res Function(_$SubModelImpl) then,
) = __$$SubModelImplCopyWithImpl<$Res>;
_$SubModelImpl value, $Res Function(_$SubModelImpl) then) =
__$$SubModelImplCopyWithImpl<$Res>;
@override
@useResult
$Res call({
int id,
String slug,
String name,
String city,
DateTime birthdate,
@JsonKey(name: 'is_entity_subscribed_by_me') bool isEntitySubscribedByMe,
String email,
@JsonKey(name: 'profile_photo_url') String profilePhotoUrl,
String role,
@JsonKey(name: 'is_public_profile') bool isPublicProfile,
@JsonKey(name: 'created_at') DateTime createdAt,
@JsonKey(name: 'updated_at') DateTime updatedAt,
});
$Res call(
{int id,
String slug,
String name,
String city,
DateTime birthdate,
@JsonKey(name: 'is_entity_subscribed_by_me') bool isEntitySubscribedByMe,
String email,
@JsonKey(name: 'profile_photo_url') String profilePhotoUrl,
String role,
@JsonKey(name: 'is_public_profile') bool isPublicProfile,
@JsonKey(name: 'created_at') DateTime createdAt,
@JsonKey(name: 'updated_at') DateTime updatedAt});
}
/// @nodoc
@@ -431,9 +401,8 @@ class __$$SubModelImplCopyWithImpl<$Res>
extends _$SubModelCopyWithImpl<$Res, _$SubModelImpl>
implements _$$SubModelImplCopyWith<$Res> {
__$$SubModelImplCopyWithImpl(
_$SubModelImpl _value,
$Res Function(_$SubModelImpl) _then,
) : super(_value, _then);
_$SubModelImpl _value, $Res Function(_$SubModelImpl) _then)
: super(_value, _then);
/// Create a copy of SubModel
/// with the given fields replaced by the non-null parameter values.
@@ -453,91 +422,76 @@ class __$$SubModelImplCopyWithImpl<$Res>
Object? createdAt = null,
Object? updatedAt = null,
}) {
return _then(
_$SubModelImpl(
id:
null == id
? _value.id
: id // ignore: cast_nullable_to_non_nullable
as int,
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,
city:
null == city
? _value.city
: city // ignore: cast_nullable_to_non_nullable
as String,
birthdate:
null == birthdate
? _value.birthdate
: birthdate // ignore: cast_nullable_to_non_nullable
as DateTime,
isEntitySubscribedByMe:
null == isEntitySubscribedByMe
? _value.isEntitySubscribedByMe
: isEntitySubscribedByMe // ignore: cast_nullable_to_non_nullable
as bool,
email:
null == email
? _value.email
: email // ignore: cast_nullable_to_non_nullable
as String,
profilePhotoUrl:
null == profilePhotoUrl
? _value.profilePhotoUrl
: profilePhotoUrl // ignore: cast_nullable_to_non_nullable
as String,
role:
null == role
? _value.role
: role // ignore: cast_nullable_to_non_nullable
as String,
isPublicProfile:
null == isPublicProfile
? _value.isPublicProfile
: isPublicProfile // ignore: cast_nullable_to_non_nullable
as bool,
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,
),
);
return _then(_$SubModelImpl(
id: null == id
? _value.id
: id // ignore: cast_nullable_to_non_nullable
as int,
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,
city: null == city
? _value.city
: city // ignore: cast_nullable_to_non_nullable
as String,
birthdate: null == birthdate
? _value.birthdate
: birthdate // ignore: cast_nullable_to_non_nullable
as DateTime,
isEntitySubscribedByMe: null == isEntitySubscribedByMe
? _value.isEntitySubscribedByMe
: isEntitySubscribedByMe // ignore: cast_nullable_to_non_nullable
as bool,
email: null == email
? _value.email
: email // ignore: cast_nullable_to_non_nullable
as String,
profilePhotoUrl: null == profilePhotoUrl
? _value.profilePhotoUrl
: profilePhotoUrl // ignore: cast_nullable_to_non_nullable
as String,
role: null == role
? _value.role
: role // ignore: cast_nullable_to_non_nullable
as String,
isPublicProfile: null == isPublicProfile
? _value.isPublicProfile
: isPublicProfile // ignore: cast_nullable_to_non_nullable
as bool,
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,
));
}
}
/// @nodoc
@JsonSerializable()
class _$SubModelImpl implements _SubModel {
const _$SubModelImpl({
required this.id,
required this.slug,
required this.name,
required this.city,
required this.birthdate,
@JsonKey(name: 'is_entity_subscribed_by_me')
required this.isEntitySubscribedByMe,
required this.email,
@JsonKey(name: 'profile_photo_url') required this.profilePhotoUrl,
required this.role,
@JsonKey(name: 'is_public_profile') required this.isPublicProfile,
@JsonKey(name: 'created_at') required this.createdAt,
@JsonKey(name: 'updated_at') required this.updatedAt,
});
const _$SubModelImpl(
{required this.id,
required this.slug,
required this.name,
required this.city,
required this.birthdate,
@JsonKey(name: 'is_entity_subscribed_by_me')
required this.isEntitySubscribedByMe,
required this.email,
@JsonKey(name: 'profile_photo_url') required this.profilePhotoUrl,
required this.role,
@JsonKey(name: 'is_public_profile') required this.isPublicProfile,
@JsonKey(name: 'created_at') required this.createdAt,
@JsonKey(name: 'updated_at') required this.updatedAt});
factory _$SubModelImpl.fromJson(Map<String, dynamic> json) =>
_$$SubModelImplFromJson(json);
@@ -605,20 +559,19 @@ class _$SubModelImpl implements _SubModel {
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(
runtimeType,
id,
slug,
name,
city,
birthdate,
isEntitySubscribedByMe,
email,
profilePhotoUrl,
role,
isPublicProfile,
createdAt,
updatedAt,
);
runtimeType,
id,
slug,
name,
city,
birthdate,
isEntitySubscribedByMe,
email,
profilePhotoUrl,
role,
isPublicProfile,
createdAt,
updatedAt);
/// Create a copy of SubModel
/// with the given fields replaced by the non-null parameter values.
@@ -630,26 +583,28 @@ class _$SubModelImpl implements _SubModel {
@override
Map<String, dynamic> toJson() {
return _$$SubModelImplToJson(this);
return _$$SubModelImplToJson(
this,
);
}
}
abstract class _SubModel implements SubModel {
const factory _SubModel({
required final int id,
required final String slug,
required final String name,
required final String city,
required final DateTime birthdate,
@JsonKey(name: 'is_entity_subscribed_by_me')
required final bool isEntitySubscribedByMe,
required final String email,
@JsonKey(name: 'profile_photo_url') required final String profilePhotoUrl,
required final String role,
@JsonKey(name: 'is_public_profile') required final bool isPublicProfile,
@JsonKey(name: 'created_at') required final DateTime createdAt,
@JsonKey(name: 'updated_at') required final DateTime updatedAt,
}) = _$SubModelImpl;
const factory _SubModel(
{required final int id,
required final String slug,
required final String name,
required final String city,
required final DateTime birthdate,
@JsonKey(name: 'is_entity_subscribed_by_me')
required final bool isEntitySubscribedByMe,
required final String email,
@JsonKey(name: 'profile_photo_url') required final String profilePhotoUrl,
required final String role,
@JsonKey(name: 'is_public_profile') required final bool isPublicProfile,
@JsonKey(name: 'created_at') required final DateTime createdAt,
@JsonKey(name: 'updated_at')
required final DateTime updatedAt}) = _$SubModelImpl;
factory _SubModel.fromJson(Map<String, dynamic> json) =
_$SubModelImpl.fromJson;

View File

@@ -7,23 +7,22 @@ part of 'sub_model.dart';
// **************************************************************************
_$SubPaginationModelImpl _$$SubPaginationModelImplFromJson(
Map<String, dynamic> json,
) => _$SubPaginationModelImpl(
data:
(json['data'] as List<dynamic>)
Map<String, dynamic> json) =>
_$SubPaginationModelImpl(
data: (json['data'] as List<dynamic>)
.map((e) => SubModel.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> _$$SubPaginationModelImplToJson(
_$SubPaginationModelImpl instance,
) => <String, dynamic>{
'data': instance.data,
'links': instance.links,
'meta': instance.meta,
};
_$SubPaginationModelImpl instance) =>
<String, dynamic>{
'data': instance.data,
'links': instance.links,
'meta': instance.meta,
};
_$SubModelImpl _$$SubModelImplFromJson(Map<String, dynamic> json) =>
_$SubModelImpl(

View File

@@ -12,8 +12,7 @@ part of 'weight_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');
WeightModel _$WeightModelFromJson(Map<String, dynamic> json) {
return _WeightModel.fromJson(json);
@@ -47,18 +46,16 @@ mixin _$WeightModel {
/// @nodoc
abstract class $WeightModelCopyWith<$Res> {
factory $WeightModelCopyWith(
WeightModel value,
$Res Function(WeightModel) then,
) = _$WeightModelCopyWithImpl<$Res, WeightModel>;
WeightModel value, $Res Function(WeightModel) then) =
_$WeightModelCopyWithImpl<$Res, WeightModel>;
@useResult
$Res call({
@JsonKey(name: "id") int id,
@JsonKey(name: "user_id") int userId,
@JsonKey(name: "weight") int weight,
@JsonKey(name: "created_at") DateTime createdAt,
@JsonKey(name: "updated_at") DateTime updatedAt,
@JsonKey(name: "bmi") double bmi,
});
$Res call(
{@JsonKey(name: "id") int id,
@JsonKey(name: "user_id") int userId,
@JsonKey(name: "weight") int weight,
@JsonKey(name: "created_at") DateTime createdAt,
@JsonKey(name: "updated_at") DateTime updatedAt,
@JsonKey(name: "bmi") double bmi});
}
/// @nodoc
@@ -83,41 +80,32 @@ class _$WeightModelCopyWithImpl<$Res, $Val extends WeightModel>
Object? updatedAt = null,
Object? bmi = null,
}) {
return _then(
_value.copyWith(
id:
null == id
? _value.id
: id // ignore: cast_nullable_to_non_nullable
as int,
userId:
null == userId
? _value.userId
: userId // ignore: cast_nullable_to_non_nullable
as int,
weight:
null == weight
? _value.weight
: weight // ignore: cast_nullable_to_non_nullable
as int,
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,
bmi:
null == bmi
? _value.bmi
: bmi // ignore: cast_nullable_to_non_nullable
as double,
)
as $Val,
);
return _then(_value.copyWith(
id: null == id
? _value.id
: id // ignore: cast_nullable_to_non_nullable
as int,
userId: null == userId
? _value.userId
: userId // ignore: cast_nullable_to_non_nullable
as int,
weight: null == weight
? _value.weight
: weight // ignore: cast_nullable_to_non_nullable
as int,
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,
bmi: null == bmi
? _value.bmi
: bmi // ignore: cast_nullable_to_non_nullable
as double,
) as $Val);
}
}
@@ -125,19 +113,17 @@ class _$WeightModelCopyWithImpl<$Res, $Val extends WeightModel>
abstract class _$$WeightModelImplCopyWith<$Res>
implements $WeightModelCopyWith<$Res> {
factory _$$WeightModelImplCopyWith(
_$WeightModelImpl value,
$Res Function(_$WeightModelImpl) then,
) = __$$WeightModelImplCopyWithImpl<$Res>;
_$WeightModelImpl value, $Res Function(_$WeightModelImpl) then) =
__$$WeightModelImplCopyWithImpl<$Res>;
@override
@useResult
$Res call({
@JsonKey(name: "id") int id,
@JsonKey(name: "user_id") int userId,
@JsonKey(name: "weight") int weight,
@JsonKey(name: "created_at") DateTime createdAt,
@JsonKey(name: "updated_at") DateTime updatedAt,
@JsonKey(name: "bmi") double bmi,
});
$Res call(
{@JsonKey(name: "id") int id,
@JsonKey(name: "user_id") int userId,
@JsonKey(name: "weight") int weight,
@JsonKey(name: "created_at") DateTime createdAt,
@JsonKey(name: "updated_at") DateTime updatedAt,
@JsonKey(name: "bmi") double bmi});
}
/// @nodoc
@@ -145,9 +131,8 @@ class __$$WeightModelImplCopyWithImpl<$Res>
extends _$WeightModelCopyWithImpl<$Res, _$WeightModelImpl>
implements _$$WeightModelImplCopyWith<$Res> {
__$$WeightModelImplCopyWithImpl(
_$WeightModelImpl _value,
$Res Function(_$WeightModelImpl) _then,
) : super(_value, _then);
_$WeightModelImpl _value, $Res Function(_$WeightModelImpl) _then)
: super(_value, _then);
/// Create a copy of WeightModel
/// with the given fields replaced by the non-null parameter values.
@@ -161,54 +146,45 @@ class __$$WeightModelImplCopyWithImpl<$Res>
Object? updatedAt = null,
Object? bmi = null,
}) {
return _then(
_$WeightModelImpl(
id:
null == id
? _value.id
: id // ignore: cast_nullable_to_non_nullable
as int,
userId:
null == userId
? _value.userId
: userId // ignore: cast_nullable_to_non_nullable
as int,
weight:
null == weight
? _value.weight
: weight // ignore: cast_nullable_to_non_nullable
as int,
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,
bmi:
null == bmi
? _value.bmi
: bmi // ignore: cast_nullable_to_non_nullable
as double,
),
);
return _then(_$WeightModelImpl(
id: null == id
? _value.id
: id // ignore: cast_nullable_to_non_nullable
as int,
userId: null == userId
? _value.userId
: userId // ignore: cast_nullable_to_non_nullable
as int,
weight: null == weight
? _value.weight
: weight // ignore: cast_nullable_to_non_nullable
as int,
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,
bmi: null == bmi
? _value.bmi
: bmi // ignore: cast_nullable_to_non_nullable
as double,
));
}
}
/// @nodoc
@JsonSerializable()
class _$WeightModelImpl implements _WeightModel {
const _$WeightModelImpl({
@JsonKey(name: "id") required this.id,
@JsonKey(name: "user_id") required this.userId,
@JsonKey(name: "weight") required this.weight,
@JsonKey(name: "created_at") required this.createdAt,
@JsonKey(name: "updated_at") required this.updatedAt,
@JsonKey(name: "bmi") required this.bmi,
});
const _$WeightModelImpl(
{@JsonKey(name: "id") required this.id,
@JsonKey(name: "user_id") required this.userId,
@JsonKey(name: "weight") required this.weight,
@JsonKey(name: "created_at") required this.createdAt,
@JsonKey(name: "updated_at") required this.updatedAt,
@JsonKey(name: "bmi") required this.bmi});
factory _$WeightModelImpl.fromJson(Map<String, dynamic> json) =>
_$$WeightModelImplFromJson(json);
@@ -267,19 +243,20 @@ class _$WeightModelImpl implements _WeightModel {
@override
Map<String, dynamic> toJson() {
return _$$WeightModelImplToJson(this);
return _$$WeightModelImplToJson(
this,
);
}
}
abstract class _WeightModel implements WeightModel {
const factory _WeightModel({
@JsonKey(name: "id") required final int id,
@JsonKey(name: "user_id") required final int userId,
@JsonKey(name: "weight") required final int weight,
@JsonKey(name: "created_at") required final DateTime createdAt,
@JsonKey(name: "updated_at") required final DateTime updatedAt,
@JsonKey(name: "bmi") required final double bmi,
}) = _$WeightModelImpl;
const factory _WeightModel(
{@JsonKey(name: "id") required final int id,
@JsonKey(name: "user_id") required final int userId,
@JsonKey(name: "weight") required final int weight,
@JsonKey(name: "created_at") required final DateTime createdAt,
@JsonKey(name: "updated_at") required final DateTime updatedAt,
@JsonKey(name: "bmi") required final double bmi}) = _$WeightModelImpl;
factory _WeightModel.fromJson(Map<String, dynamic> json) =
_$WeightModelImpl.fromJson;