forked from eatvio/eatvio_app
chat has been updated
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -7,16 +7,14 @@ part of 'diary_day_model.dart';
|
||||
// **************************************************************************
|
||||
|
||||
_$DiaryDayWrapperModelImpl _$$DiaryDayWrapperModelImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$DiaryDayWrapperModelImpl(
|
||||
diary: DiaryDayModel.fromJson(json['diary'] as Map<String, dynamic>),
|
||||
);
|
||||
Map<String, dynamic> json,
|
||||
) => _$DiaryDayWrapperModelImpl(
|
||||
diary: DiaryDayModel.fromJson(json['diary'] as Map<String, dynamic>),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$DiaryDayWrapperModelImplToJson(
|
||||
_$DiaryDayWrapperModelImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'diary': instance.diary,
|
||||
};
|
||||
_$DiaryDayWrapperModelImpl instance,
|
||||
) => <String, dynamic>{'diary': instance.diary};
|
||||
|
||||
_$DiaryDayModelImpl _$$DiaryDayModelImplFromJson(Map<String, dynamic> json) =>
|
||||
_$DiaryDayModelImpl(
|
||||
@@ -26,11 +24,13 @@ _$DiaryDayModelImpl _$$DiaryDayModelImplFromJson(Map<String, dynamic> json) =>
|
||||
retire: json['retire'] as String?,
|
||||
closed: (json['closed'] as num).toInt(),
|
||||
comment: json['comment'] as String,
|
||||
typeOfDiary:
|
||||
TypeOfDiaryModel.fromJson(json['state'] as Map<String, dynamic>),
|
||||
meals: (json['meals'] as List<dynamic>)
|
||||
.map((e) => MealModel.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
typeOfDiary: TypeOfDiaryModel.fromJson(
|
||||
json['state'] as Map<String, dynamic>,
|
||||
),
|
||||
meals:
|
||||
(json['meals'] as List<dynamic>)
|
||||
.map((e) => MealModel.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$DiaryDayModelImplToJson(_$DiaryDayModelImpl instance) =>
|
||||
@@ -52,12 +52,14 @@ _$MealModelImpl _$$MealModelImplFromJson(Map<String, dynamic> json) =>
|
||||
typeNumber: (json['type_no'] as num).toInt(),
|
||||
satiety: (json['satiety'] as num).toInt(),
|
||||
mood: (json['mood'] as num).toInt(),
|
||||
portions: (json['portions'] as List<dynamic>)
|
||||
.map((e) => PortionModel.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
photos: (json['photos'] as List<dynamic>)
|
||||
.map((e) => DiaryPhotoModel.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
portions:
|
||||
(json['portions'] as List<dynamic>)
|
||||
.map((e) => PortionModel.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
photos:
|
||||
(json['photos'] as List<dynamic>)
|
||||
.map((e) => DiaryPhotoModel.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$MealModelImplToJson(_$MealModelImpl instance) =>
|
||||
@@ -72,22 +74,22 @@ Map<String, dynamic> _$$MealModelImplToJson(_$MealModelImpl instance) =>
|
||||
};
|
||||
|
||||
_$DiaryPhotoModelImpl _$$DiaryPhotoModelImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$DiaryPhotoModelImpl(
|
||||
id: (json['id'] as num).toInt(),
|
||||
originalName: json['original_name'] as String,
|
||||
path: json['path'] as String,
|
||||
size: (json['size'] as num).toInt(),
|
||||
);
|
||||
Map<String, dynamic> json,
|
||||
) => _$DiaryPhotoModelImpl(
|
||||
id: (json['id'] as num).toInt(),
|
||||
originalName: json['original_name'] as String,
|
||||
path: json['path'] as String,
|
||||
size: (json['size'] as num).toInt(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$DiaryPhotoModelImplToJson(
|
||||
_$DiaryPhotoModelImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'id': instance.id,
|
||||
'original_name': instance.originalName,
|
||||
'path': instance.path,
|
||||
'size': instance.size,
|
||||
};
|
||||
_$DiaryPhotoModelImpl instance,
|
||||
) => <String, dynamic>{
|
||||
'id': instance.id,
|
||||
'original_name': instance.originalName,
|
||||
'path': instance.path,
|
||||
'size': instance.size,
|
||||
};
|
||||
|
||||
_$PortionModelImpl _$$PortionModelImplFromJson(Map<String, dynamic> json) =>
|
||||
_$PortionModelImpl(
|
||||
@@ -124,18 +126,18 @@ const _$PortionStateEnumMap = {
|
||||
};
|
||||
|
||||
_$TypeOfDiaryModelImpl _$$TypeOfDiaryModelImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$TypeOfDiaryModelImpl(
|
||||
hasChosenDiet: json['has_chosen_diet'] as bool,
|
||||
hasChosenPlan: json['has_chosen_plan'] as bool,
|
||||
);
|
||||
Map<String, dynamic> json,
|
||||
) => _$TypeOfDiaryModelImpl(
|
||||
hasChosenDiet: json['has_chosen_diet'] as bool,
|
||||
hasChosenPlan: json['has_chosen_plan'] as bool,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$TypeOfDiaryModelImplToJson(
|
||||
_$TypeOfDiaryModelImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'has_chosen_diet': instance.hasChosenDiet,
|
||||
'has_chosen_plan': instance.hasChosenPlan,
|
||||
};
|
||||
_$TypeOfDiaryModelImpl instance,
|
||||
) => <String, dynamic>{
|
||||
'has_chosen_diet': instance.hasChosenDiet,
|
||||
'has_chosen_plan': instance.hasChosenPlan,
|
||||
};
|
||||
|
||||
_$ProductInMealImpl _$$ProductInMealImplFromJson(Map<String, dynamic> json) =>
|
||||
_$ProductInMealImpl(
|
||||
|
||||
@@ -12,7 +12,8 @@ part of 'diary_index_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',
|
||||
);
|
||||
|
||||
DiaryIndexModel _$DiaryIndexModelFromJson(Map<String, dynamic> json) {
|
||||
return _DiaryIndexModel.fromJson(json);
|
||||
@@ -35,8 +36,9 @@ mixin _$DiaryIndexModel {
|
||||
/// @nodoc
|
||||
abstract class $DiaryIndexModelCopyWith<$Res> {
|
||||
factory $DiaryIndexModelCopyWith(
|
||||
DiaryIndexModel value, $Res Function(DiaryIndexModel) then) =
|
||||
_$DiaryIndexModelCopyWithImpl<$Res, DiaryIndexModel>;
|
||||
DiaryIndexModel value,
|
||||
$Res Function(DiaryIndexModel) then,
|
||||
) = _$DiaryIndexModelCopyWithImpl<$Res, DiaryIndexModel>;
|
||||
@useResult
|
||||
$Res call({int id});
|
||||
}
|
||||
@@ -55,24 +57,27 @@ class _$DiaryIndexModelCopyWithImpl<$Res, $Val extends DiaryIndexModel>
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? id = null,
|
||||
}) {
|
||||
return _then(_value.copyWith(
|
||||
id: null == id
|
||||
? _value.id
|
||||
: id // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
) as $Val);
|
||||
$Res call({Object? id = null}) {
|
||||
return _then(
|
||||
_value.copyWith(
|
||||
id:
|
||||
null == id
|
||||
? _value.id
|
||||
: id // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
)
|
||||
as $Val,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$DiaryIndexModelImplCopyWith<$Res>
|
||||
implements $DiaryIndexModelCopyWith<$Res> {
|
||||
factory _$$DiaryIndexModelImplCopyWith(_$DiaryIndexModelImpl value,
|
||||
$Res Function(_$DiaryIndexModelImpl) then) =
|
||||
__$$DiaryIndexModelImplCopyWithImpl<$Res>;
|
||||
factory _$$DiaryIndexModelImplCopyWith(
|
||||
_$DiaryIndexModelImpl value,
|
||||
$Res Function(_$DiaryIndexModelImpl) then,
|
||||
) = __$$DiaryIndexModelImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call({int id});
|
||||
@@ -83,22 +88,24 @@ class __$$DiaryIndexModelImplCopyWithImpl<$Res>
|
||||
extends _$DiaryIndexModelCopyWithImpl<$Res, _$DiaryIndexModelImpl>
|
||||
implements _$$DiaryIndexModelImplCopyWith<$Res> {
|
||||
__$$DiaryIndexModelImplCopyWithImpl(
|
||||
_$DiaryIndexModelImpl _value, $Res Function(_$DiaryIndexModelImpl) _then)
|
||||
: super(_value, _then);
|
||||
_$DiaryIndexModelImpl _value,
|
||||
$Res Function(_$DiaryIndexModelImpl) _then,
|
||||
) : super(_value, _then);
|
||||
|
||||
/// Create a copy of DiaryIndexModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? id = null,
|
||||
}) {
|
||||
return _then(_$DiaryIndexModelImpl(
|
||||
id: null == id
|
||||
? _value.id
|
||||
: id // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
));
|
||||
$Res call({Object? id = null}) {
|
||||
return _then(
|
||||
_$DiaryIndexModelImpl(
|
||||
id:
|
||||
null == id
|
||||
? _value.id
|
||||
: id // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -137,13 +144,13 @@ class _$DiaryIndexModelImpl implements _DiaryIndexModel {
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$DiaryIndexModelImplCopyWith<_$DiaryIndexModelImpl> get copyWith =>
|
||||
__$$DiaryIndexModelImplCopyWithImpl<_$DiaryIndexModelImpl>(
|
||||
this, _$identity);
|
||||
this,
|
||||
_$identity,
|
||||
);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$$DiaryIndexModelImplToJson(
|
||||
this,
|
||||
);
|
||||
return _$$DiaryIndexModelImplToJson(this);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -7,13 +7,9 @@ part of 'diary_index_model.dart';
|
||||
// **************************************************************************
|
||||
|
||||
_$DiaryIndexModelImpl _$$DiaryIndexModelImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$DiaryIndexModelImpl(
|
||||
id: (json['id'] as num).toInt(),
|
||||
);
|
||||
Map<String, dynamic> json,
|
||||
) => _$DiaryIndexModelImpl(id: (json['id'] as num).toInt());
|
||||
|
||||
Map<String, dynamic> _$$DiaryIndexModelImplToJson(
|
||||
_$DiaryIndexModelImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'id': instance.id,
|
||||
};
|
||||
_$DiaryIndexModelImpl instance,
|
||||
) => <String, dynamic>{'id': instance.id};
|
||||
|
||||
@@ -12,7 +12,8 @@ part of 'finish_diary_day_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',
|
||||
);
|
||||
|
||||
FinishDiaryDayModel _$FinishDiaryDayModelFromJson(Map<String, dynamic> json) {
|
||||
return _FinishDiaryDayModel.fromJson(json);
|
||||
@@ -36,8 +37,9 @@ mixin _$FinishDiaryDayModel {
|
||||
/// @nodoc
|
||||
abstract class $FinishDiaryDayModelCopyWith<$Res> {
|
||||
factory $FinishDiaryDayModelCopyWith(
|
||||
FinishDiaryDayModel value, $Res Function(FinishDiaryDayModel) then) =
|
||||
_$FinishDiaryDayModelCopyWithImpl<$Res, FinishDiaryDayModel>;
|
||||
FinishDiaryDayModel value,
|
||||
$Res Function(FinishDiaryDayModel) then,
|
||||
) = _$FinishDiaryDayModelCopyWithImpl<$Res, FinishDiaryDayModel>;
|
||||
@useResult
|
||||
$Res call({String wakeUp, String retire});
|
||||
}
|
||||
@@ -56,29 +58,32 @@ class _$FinishDiaryDayModelCopyWithImpl<$Res, $Val extends FinishDiaryDayModel>
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? wakeUp = null,
|
||||
Object? retire = null,
|
||||
}) {
|
||||
return _then(_value.copyWith(
|
||||
wakeUp: null == wakeUp
|
||||
? _value.wakeUp
|
||||
: wakeUp // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
retire: null == retire
|
||||
? _value.retire
|
||||
: retire // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
) as $Val);
|
||||
$Res call({Object? wakeUp = null, Object? retire = null}) {
|
||||
return _then(
|
||||
_value.copyWith(
|
||||
wakeUp:
|
||||
null == wakeUp
|
||||
? _value.wakeUp
|
||||
: wakeUp // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
retire:
|
||||
null == retire
|
||||
? _value.retire
|
||||
: retire // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
)
|
||||
as $Val,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$FinishDiaryDayModelImplCopyWith<$Res>
|
||||
implements $FinishDiaryDayModelCopyWith<$Res> {
|
||||
factory _$$FinishDiaryDayModelImplCopyWith(_$FinishDiaryDayModelImpl value,
|
||||
$Res Function(_$FinishDiaryDayModelImpl) then) =
|
||||
__$$FinishDiaryDayModelImplCopyWithImpl<$Res>;
|
||||
factory _$$FinishDiaryDayModelImplCopyWith(
|
||||
_$FinishDiaryDayModelImpl value,
|
||||
$Res Function(_$FinishDiaryDayModelImpl) then,
|
||||
) = __$$FinishDiaryDayModelImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call({String wakeUp, String retire});
|
||||
@@ -88,28 +93,30 @@ abstract class _$$FinishDiaryDayModelImplCopyWith<$Res>
|
||||
class __$$FinishDiaryDayModelImplCopyWithImpl<$Res>
|
||||
extends _$FinishDiaryDayModelCopyWithImpl<$Res, _$FinishDiaryDayModelImpl>
|
||||
implements _$$FinishDiaryDayModelImplCopyWith<$Res> {
|
||||
__$$FinishDiaryDayModelImplCopyWithImpl(_$FinishDiaryDayModelImpl _value,
|
||||
$Res Function(_$FinishDiaryDayModelImpl) _then)
|
||||
: super(_value, _then);
|
||||
__$$FinishDiaryDayModelImplCopyWithImpl(
|
||||
_$FinishDiaryDayModelImpl _value,
|
||||
$Res Function(_$FinishDiaryDayModelImpl) _then,
|
||||
) : super(_value, _then);
|
||||
|
||||
/// Create a copy of FinishDiaryDayModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? wakeUp = null,
|
||||
Object? retire = null,
|
||||
}) {
|
||||
return _then(_$FinishDiaryDayModelImpl(
|
||||
wakeUp: null == wakeUp
|
||||
? _value.wakeUp
|
||||
: wakeUp // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
retire: null == retire
|
||||
? _value.retire
|
||||
: retire // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
));
|
||||
$Res call({Object? wakeUp = null, Object? retire = null}) {
|
||||
return _then(
|
||||
_$FinishDiaryDayModelImpl(
|
||||
wakeUp:
|
||||
null == wakeUp
|
||||
? _value.wakeUp
|
||||
: wakeUp // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
retire:
|
||||
null == retire
|
||||
? _value.retire
|
||||
: retire // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -151,20 +158,21 @@ class _$FinishDiaryDayModelImpl implements _FinishDiaryDayModel {
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$FinishDiaryDayModelImplCopyWith<_$FinishDiaryDayModelImpl> get copyWith =>
|
||||
__$$FinishDiaryDayModelImplCopyWithImpl<_$FinishDiaryDayModelImpl>(
|
||||
this, _$identity);
|
||||
this,
|
||||
_$identity,
|
||||
);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$$FinishDiaryDayModelImplToJson(
|
||||
this,
|
||||
);
|
||||
return _$$FinishDiaryDayModelImplToJson(this);
|
||||
}
|
||||
}
|
||||
|
||||
abstract class _FinishDiaryDayModel implements FinishDiaryDayModel {
|
||||
const factory _FinishDiaryDayModel(
|
||||
{required final String wakeUp,
|
||||
required final String retire}) = _$FinishDiaryDayModelImpl;
|
||||
const factory _FinishDiaryDayModel({
|
||||
required final String wakeUp,
|
||||
required final String retire,
|
||||
}) = _$FinishDiaryDayModelImpl;
|
||||
|
||||
factory _FinishDiaryDayModel.fromJson(Map<String, dynamic> json) =
|
||||
_$FinishDiaryDayModelImpl.fromJson;
|
||||
|
||||
@@ -7,15 +7,12 @@ part of 'finish_diary_day_model.dart';
|
||||
// **************************************************************************
|
||||
|
||||
_$FinishDiaryDayModelImpl _$$FinishDiaryDayModelImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$FinishDiaryDayModelImpl(
|
||||
wakeUp: json['wakeUp'] as String,
|
||||
retire: json['retire'] as String,
|
||||
);
|
||||
Map<String, dynamic> json,
|
||||
) => _$FinishDiaryDayModelImpl(
|
||||
wakeUp: json['wakeUp'] as String,
|
||||
retire: json['retire'] as String,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$FinishDiaryDayModelImplToJson(
|
||||
_$FinishDiaryDayModelImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'wakeUp': instance.wakeUp,
|
||||
'retire': instance.retire,
|
||||
};
|
||||
_$FinishDiaryDayModelImpl instance,
|
||||
) => <String, dynamic>{'wakeUp': instance.wakeUp, 'retire': instance.retire};
|
||||
|
||||
@@ -12,7 +12,8 @@ part of 'nutrition_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',
|
||||
);
|
||||
|
||||
NutritionDataModel _$NutritionDataModelFromJson(Map<String, dynamic> json) {
|
||||
return _NutritionDataModel.fromJson(json);
|
||||
@@ -37,12 +38,14 @@ mixin _$NutritionDataModel {
|
||||
/// @nodoc
|
||||
abstract class $NutritionDataModelCopyWith<$Res> {
|
||||
factory $NutritionDataModelCopyWith(
|
||||
NutritionDataModel value, $Res Function(NutritionDataModel) then) =
|
||||
_$NutritionDataModelCopyWithImpl<$Res, NutritionDataModel>;
|
||||
NutritionDataModel value,
|
||||
$Res Function(NutritionDataModel) then,
|
||||
) = _$NutritionDataModelCopyWithImpl<$Res, NutritionDataModel>;
|
||||
@useResult
|
||||
$Res call(
|
||||
{NutritionModel dailyNutritionIntake,
|
||||
NutritionModel dailyNutritionRecommendation});
|
||||
$Res call({
|
||||
NutritionModel dailyNutritionIntake,
|
||||
NutritionModel dailyNutritionRecommendation,
|
||||
});
|
||||
|
||||
$NutritionModelCopyWith<$Res> get dailyNutritionIntake;
|
||||
$NutritionModelCopyWith<$Res> get dailyNutritionRecommendation;
|
||||
@@ -66,16 +69,21 @@ class _$NutritionDataModelCopyWithImpl<$Res, $Val extends NutritionDataModel>
|
||||
Object? dailyNutritionIntake = null,
|
||||
Object? dailyNutritionRecommendation = null,
|
||||
}) {
|
||||
return _then(_value.copyWith(
|
||||
dailyNutritionIntake: null == dailyNutritionIntake
|
||||
? _value.dailyNutritionIntake
|
||||
: dailyNutritionIntake // ignore: cast_nullable_to_non_nullable
|
||||
as NutritionModel,
|
||||
dailyNutritionRecommendation: null == dailyNutritionRecommendation
|
||||
? _value.dailyNutritionRecommendation
|
||||
: dailyNutritionRecommendation // ignore: cast_nullable_to_non_nullable
|
||||
as NutritionModel,
|
||||
) as $Val);
|
||||
return _then(
|
||||
_value.copyWith(
|
||||
dailyNutritionIntake:
|
||||
null == dailyNutritionIntake
|
||||
? _value.dailyNutritionIntake
|
||||
: dailyNutritionIntake // ignore: cast_nullable_to_non_nullable
|
||||
as NutritionModel,
|
||||
dailyNutritionRecommendation:
|
||||
null == dailyNutritionRecommendation
|
||||
? _value.dailyNutritionRecommendation
|
||||
: dailyNutritionRecommendation // ignore: cast_nullable_to_non_nullable
|
||||
as NutritionModel,
|
||||
)
|
||||
as $Val,
|
||||
);
|
||||
}
|
||||
|
||||
/// Create a copy of NutritionDataModel
|
||||
@@ -93,10 +101,12 @@ class _$NutritionDataModelCopyWithImpl<$Res, $Val extends NutritionDataModel>
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$NutritionModelCopyWith<$Res> get dailyNutritionRecommendation {
|
||||
return $NutritionModelCopyWith<$Res>(_value.dailyNutritionRecommendation,
|
||||
(value) {
|
||||
return $NutritionModelCopyWith<$Res>(_value.dailyNutritionRecommendation, (
|
||||
value,
|
||||
) {
|
||||
return _then(
|
||||
_value.copyWith(dailyNutritionRecommendation: value) as $Val);
|
||||
_value.copyWith(dailyNutritionRecommendation: value) as $Val,
|
||||
);
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -104,14 +114,16 @@ class _$NutritionDataModelCopyWithImpl<$Res, $Val extends NutritionDataModel>
|
||||
/// @nodoc
|
||||
abstract class _$$NutritionDataModelImplCopyWith<$Res>
|
||||
implements $NutritionDataModelCopyWith<$Res> {
|
||||
factory _$$NutritionDataModelImplCopyWith(_$NutritionDataModelImpl value,
|
||||
$Res Function(_$NutritionDataModelImpl) then) =
|
||||
__$$NutritionDataModelImplCopyWithImpl<$Res>;
|
||||
factory _$$NutritionDataModelImplCopyWith(
|
||||
_$NutritionDataModelImpl value,
|
||||
$Res Function(_$NutritionDataModelImpl) then,
|
||||
) = __$$NutritionDataModelImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call(
|
||||
{NutritionModel dailyNutritionIntake,
|
||||
NutritionModel dailyNutritionRecommendation});
|
||||
$Res call({
|
||||
NutritionModel dailyNutritionIntake,
|
||||
NutritionModel dailyNutritionRecommendation,
|
||||
});
|
||||
|
||||
@override
|
||||
$NutritionModelCopyWith<$Res> get dailyNutritionIntake;
|
||||
@@ -123,9 +135,10 @@ abstract class _$$NutritionDataModelImplCopyWith<$Res>
|
||||
class __$$NutritionDataModelImplCopyWithImpl<$Res>
|
||||
extends _$NutritionDataModelCopyWithImpl<$Res, _$NutritionDataModelImpl>
|
||||
implements _$$NutritionDataModelImplCopyWith<$Res> {
|
||||
__$$NutritionDataModelImplCopyWithImpl(_$NutritionDataModelImpl _value,
|
||||
$Res Function(_$NutritionDataModelImpl) _then)
|
||||
: super(_value, _then);
|
||||
__$$NutritionDataModelImplCopyWithImpl(
|
||||
_$NutritionDataModelImpl _value,
|
||||
$Res Function(_$NutritionDataModelImpl) _then,
|
||||
) : super(_value, _then);
|
||||
|
||||
/// Create a copy of NutritionDataModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -135,25 +148,30 @@ class __$$NutritionDataModelImplCopyWithImpl<$Res>
|
||||
Object? dailyNutritionIntake = null,
|
||||
Object? dailyNutritionRecommendation = null,
|
||||
}) {
|
||||
return _then(_$NutritionDataModelImpl(
|
||||
dailyNutritionIntake: null == dailyNutritionIntake
|
||||
? _value.dailyNutritionIntake
|
||||
: dailyNutritionIntake // ignore: cast_nullable_to_non_nullable
|
||||
as NutritionModel,
|
||||
dailyNutritionRecommendation: null == dailyNutritionRecommendation
|
||||
? _value.dailyNutritionRecommendation
|
||||
: dailyNutritionRecommendation // ignore: cast_nullable_to_non_nullable
|
||||
as NutritionModel,
|
||||
));
|
||||
return _then(
|
||||
_$NutritionDataModelImpl(
|
||||
dailyNutritionIntake:
|
||||
null == dailyNutritionIntake
|
||||
? _value.dailyNutritionIntake
|
||||
: dailyNutritionIntake // ignore: cast_nullable_to_non_nullable
|
||||
as NutritionModel,
|
||||
dailyNutritionRecommendation:
|
||||
null == dailyNutritionRecommendation
|
||||
? _value.dailyNutritionRecommendation
|
||||
: dailyNutritionRecommendation // ignore: cast_nullable_to_non_nullable
|
||||
as NutritionModel,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
class _$NutritionDataModelImpl implements _NutritionDataModel {
|
||||
const _$NutritionDataModelImpl(
|
||||
{required this.dailyNutritionIntake,
|
||||
required this.dailyNutritionRecommendation});
|
||||
const _$NutritionDataModelImpl({
|
||||
required this.dailyNutritionIntake,
|
||||
required this.dailyNutritionRecommendation,
|
||||
});
|
||||
|
||||
factory _$NutritionDataModelImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$NutritionDataModelImplFromJson(json);
|
||||
@@ -175,8 +193,10 @@ class _$NutritionDataModelImpl implements _NutritionDataModel {
|
||||
other is _$NutritionDataModelImpl &&
|
||||
(identical(other.dailyNutritionIntake, dailyNutritionIntake) ||
|
||||
other.dailyNutritionIntake == dailyNutritionIntake) &&
|
||||
(identical(other.dailyNutritionRecommendation,
|
||||
dailyNutritionRecommendation) ||
|
||||
(identical(
|
||||
other.dailyNutritionRecommendation,
|
||||
dailyNutritionRecommendation,
|
||||
) ||
|
||||
other.dailyNutritionRecommendation ==
|
||||
dailyNutritionRecommendation));
|
||||
}
|
||||
@@ -184,7 +204,10 @@ class _$NutritionDataModelImpl implements _NutritionDataModel {
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(
|
||||
runtimeType, dailyNutritionIntake, dailyNutritionRecommendation);
|
||||
runtimeType,
|
||||
dailyNutritionIntake,
|
||||
dailyNutritionRecommendation,
|
||||
);
|
||||
|
||||
/// Create a copy of NutritionDataModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -193,21 +216,21 @@ class _$NutritionDataModelImpl implements _NutritionDataModel {
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$NutritionDataModelImplCopyWith<_$NutritionDataModelImpl> get copyWith =>
|
||||
__$$NutritionDataModelImplCopyWithImpl<_$NutritionDataModelImpl>(
|
||||
this, _$identity);
|
||||
this,
|
||||
_$identity,
|
||||
);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$$NutritionDataModelImplToJson(
|
||||
this,
|
||||
);
|
||||
return _$$NutritionDataModelImplToJson(this);
|
||||
}
|
||||
}
|
||||
|
||||
abstract class _NutritionDataModel implements NutritionDataModel {
|
||||
const factory _NutritionDataModel(
|
||||
{required final NutritionModel dailyNutritionIntake,
|
||||
required final NutritionModel dailyNutritionRecommendation}) =
|
||||
_$NutritionDataModelImpl;
|
||||
const factory _NutritionDataModel({
|
||||
required final NutritionModel dailyNutritionIntake,
|
||||
required final NutritionModel dailyNutritionRecommendation,
|
||||
}) = _$NutritionDataModelImpl;
|
||||
|
||||
factory _NutritionDataModel.fromJson(Map<String, dynamic> json) =
|
||||
_$NutritionDataModelImpl.fromJson;
|
||||
@@ -249,11 +272,16 @@ mixin _$NutritionModel {
|
||||
/// @nodoc
|
||||
abstract class $NutritionModelCopyWith<$Res> {
|
||||
factory $NutritionModelCopyWith(
|
||||
NutritionModel value, $Res Function(NutritionModel) then) =
|
||||
_$NutritionModelCopyWithImpl<$Res, NutritionModel>;
|
||||
NutritionModel value,
|
||||
$Res Function(NutritionModel) then,
|
||||
) = _$NutritionModelCopyWithImpl<$Res, NutritionModel>;
|
||||
@useResult
|
||||
$Res call(
|
||||
{double energy, double proteins, double fats, double carbohydrates});
|
||||
$Res call({
|
||||
double energy,
|
||||
double proteins,
|
||||
double fats,
|
||||
double carbohydrates,
|
||||
});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@@ -276,37 +304,49 @@ class _$NutritionModelCopyWithImpl<$Res, $Val extends NutritionModel>
|
||||
Object? fats = null,
|
||||
Object? carbohydrates = null,
|
||||
}) {
|
||||
return _then(_value.copyWith(
|
||||
energy: null == energy
|
||||
? _value.energy
|
||||
: energy // ignore: cast_nullable_to_non_nullable
|
||||
as double,
|
||||
proteins: null == proteins
|
||||
? _value.proteins
|
||||
: proteins // ignore: cast_nullable_to_non_nullable
|
||||
as double,
|
||||
fats: null == fats
|
||||
? _value.fats
|
||||
: fats // ignore: cast_nullable_to_non_nullable
|
||||
as double,
|
||||
carbohydrates: null == carbohydrates
|
||||
? _value.carbohydrates
|
||||
: carbohydrates // ignore: cast_nullable_to_non_nullable
|
||||
as double,
|
||||
) as $Val);
|
||||
return _then(
|
||||
_value.copyWith(
|
||||
energy:
|
||||
null == energy
|
||||
? _value.energy
|
||||
: energy // ignore: cast_nullable_to_non_nullable
|
||||
as double,
|
||||
proteins:
|
||||
null == proteins
|
||||
? _value.proteins
|
||||
: proteins // ignore: cast_nullable_to_non_nullable
|
||||
as double,
|
||||
fats:
|
||||
null == fats
|
||||
? _value.fats
|
||||
: fats // ignore: cast_nullable_to_non_nullable
|
||||
as double,
|
||||
carbohydrates:
|
||||
null == carbohydrates
|
||||
? _value.carbohydrates
|
||||
: carbohydrates // ignore: cast_nullable_to_non_nullable
|
||||
as double,
|
||||
)
|
||||
as $Val,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$NutritionModelImplCopyWith<$Res>
|
||||
implements $NutritionModelCopyWith<$Res> {
|
||||
factory _$$NutritionModelImplCopyWith(_$NutritionModelImpl value,
|
||||
$Res Function(_$NutritionModelImpl) then) =
|
||||
__$$NutritionModelImplCopyWithImpl<$Res>;
|
||||
factory _$$NutritionModelImplCopyWith(
|
||||
_$NutritionModelImpl value,
|
||||
$Res Function(_$NutritionModelImpl) then,
|
||||
) = __$$NutritionModelImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call(
|
||||
{double energy, double proteins, double fats, double carbohydrates});
|
||||
$Res call({
|
||||
double energy,
|
||||
double proteins,
|
||||
double fats,
|
||||
double carbohydrates,
|
||||
});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@@ -314,8 +354,9 @@ class __$$NutritionModelImplCopyWithImpl<$Res>
|
||||
extends _$NutritionModelCopyWithImpl<$Res, _$NutritionModelImpl>
|
||||
implements _$$NutritionModelImplCopyWith<$Res> {
|
||||
__$$NutritionModelImplCopyWithImpl(
|
||||
_$NutritionModelImpl _value, $Res Function(_$NutritionModelImpl) _then)
|
||||
: super(_value, _then);
|
||||
_$NutritionModelImpl _value,
|
||||
$Res Function(_$NutritionModelImpl) _then,
|
||||
) : super(_value, _then);
|
||||
|
||||
/// Create a copy of NutritionModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -327,35 +368,42 @@ class __$$NutritionModelImplCopyWithImpl<$Res>
|
||||
Object? fats = null,
|
||||
Object? carbohydrates = null,
|
||||
}) {
|
||||
return _then(_$NutritionModelImpl(
|
||||
energy: null == energy
|
||||
? _value.energy
|
||||
: energy // ignore: cast_nullable_to_non_nullable
|
||||
as double,
|
||||
proteins: null == proteins
|
||||
? _value.proteins
|
||||
: proteins // ignore: cast_nullable_to_non_nullable
|
||||
as double,
|
||||
fats: null == fats
|
||||
? _value.fats
|
||||
: fats // ignore: cast_nullable_to_non_nullable
|
||||
as double,
|
||||
carbohydrates: null == carbohydrates
|
||||
? _value.carbohydrates
|
||||
: carbohydrates // ignore: cast_nullable_to_non_nullable
|
||||
as double,
|
||||
));
|
||||
return _then(
|
||||
_$NutritionModelImpl(
|
||||
energy:
|
||||
null == energy
|
||||
? _value.energy
|
||||
: energy // ignore: cast_nullable_to_non_nullable
|
||||
as double,
|
||||
proteins:
|
||||
null == proteins
|
||||
? _value.proteins
|
||||
: proteins // ignore: cast_nullable_to_non_nullable
|
||||
as double,
|
||||
fats:
|
||||
null == fats
|
||||
? _value.fats
|
||||
: fats // ignore: cast_nullable_to_non_nullable
|
||||
as double,
|
||||
carbohydrates:
|
||||
null == carbohydrates
|
||||
? _value.carbohydrates
|
||||
: carbohydrates // ignore: cast_nullable_to_non_nullable
|
||||
as double,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
class _$NutritionModelImpl implements _NutritionModel {
|
||||
const _$NutritionModelImpl(
|
||||
{required this.energy,
|
||||
required this.proteins,
|
||||
required this.fats,
|
||||
required this.carbohydrates});
|
||||
const _$NutritionModelImpl({
|
||||
required this.energy,
|
||||
required this.proteins,
|
||||
required this.fats,
|
||||
required this.carbohydrates,
|
||||
});
|
||||
|
||||
factory _$NutritionModelImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$NutritionModelImplFromJson(json);
|
||||
@@ -399,22 +447,23 @@ class _$NutritionModelImpl implements _NutritionModel {
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$NutritionModelImplCopyWith<_$NutritionModelImpl> get copyWith =>
|
||||
__$$NutritionModelImplCopyWithImpl<_$NutritionModelImpl>(
|
||||
this, _$identity);
|
||||
this,
|
||||
_$identity,
|
||||
);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$$NutritionModelImplToJson(
|
||||
this,
|
||||
);
|
||||
return _$$NutritionModelImplToJson(this);
|
||||
}
|
||||
}
|
||||
|
||||
abstract class _NutritionModel implements NutritionModel {
|
||||
const factory _NutritionModel(
|
||||
{required final double energy,
|
||||
required final double proteins,
|
||||
required final double fats,
|
||||
required final double carbohydrates}) = _$NutritionModelImpl;
|
||||
const factory _NutritionModel({
|
||||
required final double energy,
|
||||
required final double proteins,
|
||||
required final double fats,
|
||||
required final double carbohydrates,
|
||||
}) = _$NutritionModelImpl;
|
||||
|
||||
factory _NutritionModel.fromJson(Map<String, dynamic> json) =
|
||||
_$NutritionModelImpl.fromJson;
|
||||
|
||||
@@ -7,20 +7,22 @@ part of 'nutrition_model.dart';
|
||||
// **************************************************************************
|
||||
|
||||
_$NutritionDataModelImpl _$$NutritionDataModelImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$NutritionDataModelImpl(
|
||||
dailyNutritionIntake: NutritionModel.fromJson(
|
||||
json['dailyNutritionIntake'] as Map<String, dynamic>),
|
||||
dailyNutritionRecommendation: NutritionModel.fromJson(
|
||||
json['dailyNutritionRecommendation'] as Map<String, dynamic>),
|
||||
);
|
||||
Map<String, dynamic> json,
|
||||
) => _$NutritionDataModelImpl(
|
||||
dailyNutritionIntake: NutritionModel.fromJson(
|
||||
json['dailyNutritionIntake'] as Map<String, dynamic>,
|
||||
),
|
||||
dailyNutritionRecommendation: NutritionModel.fromJson(
|
||||
json['dailyNutritionRecommendation'] as Map<String, dynamic>,
|
||||
),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$NutritionDataModelImplToJson(
|
||||
_$NutritionDataModelImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'dailyNutritionIntake': instance.dailyNutritionIntake,
|
||||
'dailyNutritionRecommendation': instance.dailyNutritionRecommendation,
|
||||
};
|
||||
_$NutritionDataModelImpl instance,
|
||||
) => <String, dynamic>{
|
||||
'dailyNutritionIntake': instance.dailyNutritionIntake,
|
||||
'dailyNutritionRecommendation': instance.dailyNutritionRecommendation,
|
||||
};
|
||||
|
||||
_$NutritionModelImpl _$$NutritionModelImplFromJson(Map<String, dynamic> json) =>
|
||||
_$NutritionModelImpl(
|
||||
@@ -31,10 +33,10 @@ _$NutritionModelImpl _$$NutritionModelImplFromJson(Map<String, dynamic> json) =>
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$NutritionModelImplToJson(
|
||||
_$NutritionModelImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'energy': instance.energy,
|
||||
'proteins': instance.proteins,
|
||||
'fats': instance.fats,
|
||||
'carbohydrates': instance.carbohydrates,
|
||||
};
|
||||
_$NutritionModelImpl instance,
|
||||
) => <String, dynamic>{
|
||||
'energy': instance.energy,
|
||||
'proteins': instance.proteins,
|
||||
'fats': instance.fats,
|
||||
'carbohydrates': instance.carbohydrates,
|
||||
};
|
||||
|
||||
@@ -12,10 +12,12 @@ part of 'product_moderation_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',
|
||||
);
|
||||
|
||||
ProductModerationModel _$ProductModerationModelFromJson(
|
||||
Map<String, dynamic> json) {
|
||||
Map<String, dynamic> json,
|
||||
) {
|
||||
return _ProductModerationModel.fromJson(json);
|
||||
}
|
||||
|
||||
@@ -43,21 +45,25 @@ mixin _$ProductModerationModel {
|
||||
|
||||
/// @nodoc
|
||||
abstract class $ProductModerationModelCopyWith<$Res> {
|
||||
factory $ProductModerationModelCopyWith(ProductModerationModel value,
|
||||
$Res Function(ProductModerationModel) then) =
|
||||
_$ProductModerationModelCopyWithImpl<$Res, ProductModerationModel>;
|
||||
factory $ProductModerationModelCopyWith(
|
||||
ProductModerationModel value,
|
||||
$Res Function(ProductModerationModel) then,
|
||||
) = _$ProductModerationModelCopyWithImpl<$Res, ProductModerationModel>;
|
||||
@useResult
|
||||
$Res call(
|
||||
{String name,
|
||||
@JsonKey(name: 'energy_on_100gr') double energy,
|
||||
@JsonKey(name: 'proteins_on_100gr') double proteins,
|
||||
@JsonKey(name: 'fats_on_100gr') double fats,
|
||||
@JsonKey(name: 'carbohydrates_on_100gr') double carbohydrates});
|
||||
$Res call({
|
||||
String name,
|
||||
@JsonKey(name: 'energy_on_100gr') double energy,
|
||||
@JsonKey(name: 'proteins_on_100gr') double proteins,
|
||||
@JsonKey(name: 'fats_on_100gr') double fats,
|
||||
@JsonKey(name: 'carbohydrates_on_100gr') double carbohydrates,
|
||||
});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$ProductModerationModelCopyWithImpl<$Res,
|
||||
$Val extends ProductModerationModel>
|
||||
class _$ProductModerationModelCopyWithImpl<
|
||||
$Res,
|
||||
$Val extends ProductModerationModel
|
||||
>
|
||||
implements $ProductModerationModelCopyWith<$Res> {
|
||||
_$ProductModerationModelCopyWithImpl(this._value, this._then);
|
||||
|
||||
@@ -77,28 +83,36 @@ class _$ProductModerationModelCopyWithImpl<$Res,
|
||||
Object? fats = null,
|
||||
Object? carbohydrates = null,
|
||||
}) {
|
||||
return _then(_value.copyWith(
|
||||
name: null == name
|
||||
? _value.name
|
||||
: name // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
energy: null == energy
|
||||
? _value.energy
|
||||
: energy // ignore: cast_nullable_to_non_nullable
|
||||
as double,
|
||||
proteins: null == proteins
|
||||
? _value.proteins
|
||||
: proteins // ignore: cast_nullable_to_non_nullable
|
||||
as double,
|
||||
fats: null == fats
|
||||
? _value.fats
|
||||
: fats // ignore: cast_nullable_to_non_nullable
|
||||
as double,
|
||||
carbohydrates: null == carbohydrates
|
||||
? _value.carbohydrates
|
||||
: carbohydrates // ignore: cast_nullable_to_non_nullable
|
||||
as double,
|
||||
) as $Val);
|
||||
return _then(
|
||||
_value.copyWith(
|
||||
name:
|
||||
null == name
|
||||
? _value.name
|
||||
: name // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
energy:
|
||||
null == energy
|
||||
? _value.energy
|
||||
: energy // ignore: cast_nullable_to_non_nullable
|
||||
as double,
|
||||
proteins:
|
||||
null == proteins
|
||||
? _value.proteins
|
||||
: proteins // ignore: cast_nullable_to_non_nullable
|
||||
as double,
|
||||
fats:
|
||||
null == fats
|
||||
? _value.fats
|
||||
: fats // ignore: cast_nullable_to_non_nullable
|
||||
as double,
|
||||
carbohydrates:
|
||||
null == carbohydrates
|
||||
? _value.carbohydrates
|
||||
: carbohydrates // ignore: cast_nullable_to_non_nullable
|
||||
as double,
|
||||
)
|
||||
as $Val,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -106,28 +120,29 @@ class _$ProductModerationModelCopyWithImpl<$Res,
|
||||
abstract class _$$ProductModerationModelImplCopyWith<$Res>
|
||||
implements $ProductModerationModelCopyWith<$Res> {
|
||||
factory _$$ProductModerationModelImplCopyWith(
|
||||
_$ProductModerationModelImpl value,
|
||||
$Res Function(_$ProductModerationModelImpl) then) =
|
||||
__$$ProductModerationModelImplCopyWithImpl<$Res>;
|
||||
_$ProductModerationModelImpl value,
|
||||
$Res Function(_$ProductModerationModelImpl) then,
|
||||
) = __$$ProductModerationModelImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call(
|
||||
{String name,
|
||||
@JsonKey(name: 'energy_on_100gr') double energy,
|
||||
@JsonKey(name: 'proteins_on_100gr') double proteins,
|
||||
@JsonKey(name: 'fats_on_100gr') double fats,
|
||||
@JsonKey(name: 'carbohydrates_on_100gr') double carbohydrates});
|
||||
$Res call({
|
||||
String name,
|
||||
@JsonKey(name: 'energy_on_100gr') double energy,
|
||||
@JsonKey(name: 'proteins_on_100gr') double proteins,
|
||||
@JsonKey(name: 'fats_on_100gr') double fats,
|
||||
@JsonKey(name: 'carbohydrates_on_100gr') double carbohydrates,
|
||||
});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$ProductModerationModelImplCopyWithImpl<$Res>
|
||||
extends _$ProductModerationModelCopyWithImpl<$Res,
|
||||
_$ProductModerationModelImpl>
|
||||
extends
|
||||
_$ProductModerationModelCopyWithImpl<$Res, _$ProductModerationModelImpl>
|
||||
implements _$$ProductModerationModelImplCopyWith<$Res> {
|
||||
__$$ProductModerationModelImplCopyWithImpl(
|
||||
_$ProductModerationModelImpl _value,
|
||||
$Res Function(_$ProductModerationModelImpl) _then)
|
||||
: super(_value, _then);
|
||||
_$ProductModerationModelImpl _value,
|
||||
$Res Function(_$ProductModerationModelImpl) _then,
|
||||
) : super(_value, _then);
|
||||
|
||||
/// Create a copy of ProductModerationModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -140,40 +155,48 @@ class __$$ProductModerationModelImplCopyWithImpl<$Res>
|
||||
Object? fats = null,
|
||||
Object? carbohydrates = null,
|
||||
}) {
|
||||
return _then(_$ProductModerationModelImpl(
|
||||
name: null == name
|
||||
? _value.name
|
||||
: name // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
energy: null == energy
|
||||
? _value.energy
|
||||
: energy // ignore: cast_nullable_to_non_nullable
|
||||
as double,
|
||||
proteins: null == proteins
|
||||
? _value.proteins
|
||||
: proteins // ignore: cast_nullable_to_non_nullable
|
||||
as double,
|
||||
fats: null == fats
|
||||
? _value.fats
|
||||
: fats // ignore: cast_nullable_to_non_nullable
|
||||
as double,
|
||||
carbohydrates: null == carbohydrates
|
||||
? _value.carbohydrates
|
||||
: carbohydrates // ignore: cast_nullable_to_non_nullable
|
||||
as double,
|
||||
));
|
||||
return _then(
|
||||
_$ProductModerationModelImpl(
|
||||
name:
|
||||
null == name
|
||||
? _value.name
|
||||
: name // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
energy:
|
||||
null == energy
|
||||
? _value.energy
|
||||
: energy // ignore: cast_nullable_to_non_nullable
|
||||
as double,
|
||||
proteins:
|
||||
null == proteins
|
||||
? _value.proteins
|
||||
: proteins // ignore: cast_nullable_to_non_nullable
|
||||
as double,
|
||||
fats:
|
||||
null == fats
|
||||
? _value.fats
|
||||
: fats // ignore: cast_nullable_to_non_nullable
|
||||
as double,
|
||||
carbohydrates:
|
||||
null == carbohydrates
|
||||
? _value.carbohydrates
|
||||
: carbohydrates // ignore: cast_nullable_to_non_nullable
|
||||
as double,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
class _$ProductModerationModelImpl implements _ProductModerationModel {
|
||||
const _$ProductModerationModelImpl(
|
||||
{required this.name,
|
||||
@JsonKey(name: 'energy_on_100gr') required this.energy,
|
||||
@JsonKey(name: 'proteins_on_100gr') required this.proteins,
|
||||
@JsonKey(name: 'fats_on_100gr') required this.fats,
|
||||
@JsonKey(name: 'carbohydrates_on_100gr') required this.carbohydrates});
|
||||
const _$ProductModerationModelImpl({
|
||||
required this.name,
|
||||
@JsonKey(name: 'energy_on_100gr') required this.energy,
|
||||
@JsonKey(name: 'proteins_on_100gr') required this.proteins,
|
||||
@JsonKey(name: 'fats_on_100gr') required this.fats,
|
||||
@JsonKey(name: 'carbohydrates_on_100gr') required this.carbohydrates,
|
||||
});
|
||||
|
||||
factory _$ProductModerationModelImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$ProductModerationModelImplFromJson(json);
|
||||
@@ -223,25 +246,27 @@ class _$ProductModerationModelImpl implements _ProductModerationModel {
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$ProductModerationModelImplCopyWith<_$ProductModerationModelImpl>
|
||||
get copyWith => __$$ProductModerationModelImplCopyWithImpl<
|
||||
_$ProductModerationModelImpl>(this, _$identity);
|
||||
get copyWith =>
|
||||
__$$ProductModerationModelImplCopyWithImpl<_$ProductModerationModelImpl>(
|
||||
this,
|
||||
_$identity,
|
||||
);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$$ProductModerationModelImplToJson(
|
||||
this,
|
||||
);
|
||||
return _$$ProductModerationModelImplToJson(this);
|
||||
}
|
||||
}
|
||||
|
||||
abstract class _ProductModerationModel implements ProductModerationModel {
|
||||
const factory _ProductModerationModel(
|
||||
{required final String name,
|
||||
@JsonKey(name: 'energy_on_100gr') required final double energy,
|
||||
@JsonKey(name: 'proteins_on_100gr') required final double proteins,
|
||||
@JsonKey(name: 'fats_on_100gr') required final double fats,
|
||||
@JsonKey(name: 'carbohydrates_on_100gr')
|
||||
required final double carbohydrates}) = _$ProductModerationModelImpl;
|
||||
const factory _ProductModerationModel({
|
||||
required final String name,
|
||||
@JsonKey(name: 'energy_on_100gr') required final double energy,
|
||||
@JsonKey(name: 'proteins_on_100gr') required final double proteins,
|
||||
@JsonKey(name: 'fats_on_100gr') required final double fats,
|
||||
@JsonKey(name: 'carbohydrates_on_100gr')
|
||||
required final double carbohydrates,
|
||||
}) = _$ProductModerationModelImpl;
|
||||
|
||||
factory _ProductModerationModel.fromJson(Map<String, dynamic> json) =
|
||||
_$ProductModerationModelImpl.fromJson;
|
||||
@@ -266,5 +291,5 @@ abstract class _ProductModerationModel implements ProductModerationModel {
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$ProductModerationModelImplCopyWith<_$ProductModerationModelImpl>
|
||||
get copyWith => throw _privateConstructorUsedError;
|
||||
get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -7,21 +7,21 @@ part of 'product_moderation_model.dart';
|
||||
// **************************************************************************
|
||||
|
||||
_$ProductModerationModelImpl _$$ProductModerationModelImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$ProductModerationModelImpl(
|
||||
name: json['name'] as String,
|
||||
energy: (json['energy_on_100gr'] as num).toDouble(),
|
||||
proteins: (json['proteins_on_100gr'] as num).toDouble(),
|
||||
fats: (json['fats_on_100gr'] as num).toDouble(),
|
||||
carbohydrates: (json['carbohydrates_on_100gr'] as num).toDouble(),
|
||||
);
|
||||
Map<String, dynamic> json,
|
||||
) => _$ProductModerationModelImpl(
|
||||
name: json['name'] as String,
|
||||
energy: (json['energy_on_100gr'] as num).toDouble(),
|
||||
proteins: (json['proteins_on_100gr'] as num).toDouble(),
|
||||
fats: (json['fats_on_100gr'] as num).toDouble(),
|
||||
carbohydrates: (json['carbohydrates_on_100gr'] as num).toDouble(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$ProductModerationModelImplToJson(
|
||||
_$ProductModerationModelImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'name': instance.name,
|
||||
'energy_on_100gr': instance.energy,
|
||||
'proteins_on_100gr': instance.proteins,
|
||||
'fats_on_100gr': instance.fats,
|
||||
'carbohydrates_on_100gr': instance.carbohydrates,
|
||||
};
|
||||
_$ProductModerationModelImpl instance,
|
||||
) => <String, dynamic>{
|
||||
'name': instance.name,
|
||||
'energy_on_100gr': instance.energy,
|
||||
'proteins_on_100gr': instance.proteins,
|
||||
'fats_on_100gr': instance.fats,
|
||||
'carbohydrates_on_100gr': instance.carbohydrates,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user