Files
eatvio_app/lib/features/diary/models/product.freezed.dart

549 lines
19 KiB
Dart

// coverage:ignore-file
// GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: type=lint
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
part of 'product.dart';
// **************************************************************************
// FreezedGenerator
// **************************************************************************
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');
Product _$ProductFromJson(Map<String, dynamic> json) {
return _Product.fromJson(json);
}
/// @nodoc
mixin _$Product {
int get id => throw _privateConstructorUsedError;
String get name => throw _privateConstructorUsedError;
String get image => throw _privateConstructorUsedError;
int get productGroupId => throw _privateConstructorUsedError;
String get description => throw _privateConstructorUsedError;
String get formulations => throw _privateConstructorUsedError;
int get energyOn100gr => throw _privateConstructorUsedError;
double get proteinsOn100gr => throw _privateConstructorUsedError;
double get fatsOn100gr => throw _privateConstructorUsedError;
double get carbohydratesOn100gr => throw _privateConstructorUsedError;
int get portionMassGr => throw _privateConstructorUsedError;
int get energyOnPortion => throw _privateConstructorUsedError;
int get proteinsOnPortion => throw _privateConstructorUsedError;
int get fatsOnPortion => throw _privateConstructorUsedError;
int get carbohydratesOnPortion => throw _privateConstructorUsedError;
String get createdAt => throw _privateConstructorUsedError;
String get updatedAt => throw _privateConstructorUsedError;
String get lastState => throw _privateConstructorUsedError;
String? get reqjectReason => throw _privateConstructorUsedError;
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
@JsonKey(ignore: true)
$ProductCopyWith<Product> get copyWith => throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $ProductCopyWith<$Res> {
factory $ProductCopyWith(Product value, $Res Function(Product) then) =
_$ProductCopyWithImpl<$Res, Product>;
@useResult
$Res call(
{int id,
String name,
String image,
int productGroupId,
String description,
String formulations,
int energyOn100gr,
double proteinsOn100gr,
double fatsOn100gr,
double carbohydratesOn100gr,
int portionMassGr,
int energyOnPortion,
int proteinsOnPortion,
int fatsOnPortion,
int carbohydratesOnPortion,
String createdAt,
String updatedAt,
String lastState,
String? reqjectReason});
}
/// @nodoc
class _$ProductCopyWithImpl<$Res, $Val extends Product>
implements $ProductCopyWith<$Res> {
_$ProductCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
@pragma('vm:prefer-inline')
@override
$Res call({
Object? id = null,
Object? name = null,
Object? image = null,
Object? productGroupId = null,
Object? description = null,
Object? formulations = null,
Object? energyOn100gr = null,
Object? proteinsOn100gr = null,
Object? fatsOn100gr = null,
Object? carbohydratesOn100gr = null,
Object? portionMassGr = null,
Object? energyOnPortion = null,
Object? proteinsOnPortion = null,
Object? fatsOnPortion = null,
Object? carbohydratesOnPortion = null,
Object? createdAt = null,
Object? updatedAt = null,
Object? lastState = null,
Object? reqjectReason = freezed,
}) {
return _then(_value.copyWith(
id: null == id
? _value.id
: id // ignore: cast_nullable_to_non_nullable
as int,
name: null == name
? _value.name
: name // ignore: cast_nullable_to_non_nullable
as String,
image: null == image
? _value.image
: image // ignore: cast_nullable_to_non_nullable
as String,
productGroupId: null == productGroupId
? _value.productGroupId
: productGroupId // ignore: cast_nullable_to_non_nullable
as int,
description: null == description
? _value.description
: description // ignore: cast_nullable_to_non_nullable
as String,
formulations: null == formulations
? _value.formulations
: formulations // ignore: cast_nullable_to_non_nullable
as String,
energyOn100gr: null == energyOn100gr
? _value.energyOn100gr
: energyOn100gr // ignore: cast_nullable_to_non_nullable
as int,
proteinsOn100gr: null == proteinsOn100gr
? _value.proteinsOn100gr
: proteinsOn100gr // ignore: cast_nullable_to_non_nullable
as double,
fatsOn100gr: null == fatsOn100gr
? _value.fatsOn100gr
: fatsOn100gr // ignore: cast_nullable_to_non_nullable
as double,
carbohydratesOn100gr: null == carbohydratesOn100gr
? _value.carbohydratesOn100gr
: carbohydratesOn100gr // ignore: cast_nullable_to_non_nullable
as double,
portionMassGr: null == portionMassGr
? _value.portionMassGr
: portionMassGr // ignore: cast_nullable_to_non_nullable
as int,
energyOnPortion: null == energyOnPortion
? _value.energyOnPortion
: energyOnPortion // ignore: cast_nullable_to_non_nullable
as int,
proteinsOnPortion: null == proteinsOnPortion
? _value.proteinsOnPortion
: proteinsOnPortion // ignore: cast_nullable_to_non_nullable
as int,
fatsOnPortion: null == fatsOnPortion
? _value.fatsOnPortion
: fatsOnPortion // ignore: cast_nullable_to_non_nullable
as int,
carbohydratesOnPortion: null == carbohydratesOnPortion
? _value.carbohydratesOnPortion
: carbohydratesOnPortion // ignore: cast_nullable_to_non_nullable
as int,
createdAt: null == createdAt
? _value.createdAt
: createdAt // ignore: cast_nullable_to_non_nullable
as String,
updatedAt: null == updatedAt
? _value.updatedAt
: updatedAt // ignore: cast_nullable_to_non_nullable
as String,
lastState: null == lastState
? _value.lastState
: lastState // ignore: cast_nullable_to_non_nullable
as String,
reqjectReason: freezed == reqjectReason
? _value.reqjectReason
: reqjectReason // ignore: cast_nullable_to_non_nullable
as String?,
) as $Val);
}
}
/// @nodoc
abstract class _$$ProductImplCopyWith<$Res> implements $ProductCopyWith<$Res> {
factory _$$ProductImplCopyWith(
_$ProductImpl value, $Res Function(_$ProductImpl) then) =
__$$ProductImplCopyWithImpl<$Res>;
@override
@useResult
$Res call(
{int id,
String name,
String image,
int productGroupId,
String description,
String formulations,
int energyOn100gr,
double proteinsOn100gr,
double fatsOn100gr,
double carbohydratesOn100gr,
int portionMassGr,
int energyOnPortion,
int proteinsOnPortion,
int fatsOnPortion,
int carbohydratesOnPortion,
String createdAt,
String updatedAt,
String lastState,
String? reqjectReason});
}
/// @nodoc
class __$$ProductImplCopyWithImpl<$Res>
extends _$ProductCopyWithImpl<$Res, _$ProductImpl>
implements _$$ProductImplCopyWith<$Res> {
__$$ProductImplCopyWithImpl(
_$ProductImpl _value, $Res Function(_$ProductImpl) _then)
: super(_value, _then);
@pragma('vm:prefer-inline')
@override
$Res call({
Object? id = null,
Object? name = null,
Object? image = null,
Object? productGroupId = null,
Object? description = null,
Object? formulations = null,
Object? energyOn100gr = null,
Object? proteinsOn100gr = null,
Object? fatsOn100gr = null,
Object? carbohydratesOn100gr = null,
Object? portionMassGr = null,
Object? energyOnPortion = null,
Object? proteinsOnPortion = null,
Object? fatsOnPortion = null,
Object? carbohydratesOnPortion = null,
Object? createdAt = null,
Object? updatedAt = null,
Object? lastState = null,
Object? reqjectReason = freezed,
}) {
return _then(_$ProductImpl(
id: null == id
? _value.id
: id // ignore: cast_nullable_to_non_nullable
as int,
name: null == name
? _value.name
: name // ignore: cast_nullable_to_non_nullable
as String,
image: null == image
? _value.image
: image // ignore: cast_nullable_to_non_nullable
as String,
productGroupId: null == productGroupId
? _value.productGroupId
: productGroupId // ignore: cast_nullable_to_non_nullable
as int,
description: null == description
? _value.description
: description // ignore: cast_nullable_to_non_nullable
as String,
formulations: null == formulations
? _value.formulations
: formulations // ignore: cast_nullable_to_non_nullable
as String,
energyOn100gr: null == energyOn100gr
? _value.energyOn100gr
: energyOn100gr // ignore: cast_nullable_to_non_nullable
as int,
proteinsOn100gr: null == proteinsOn100gr
? _value.proteinsOn100gr
: proteinsOn100gr // ignore: cast_nullable_to_non_nullable
as double,
fatsOn100gr: null == fatsOn100gr
? _value.fatsOn100gr
: fatsOn100gr // ignore: cast_nullable_to_non_nullable
as double,
carbohydratesOn100gr: null == carbohydratesOn100gr
? _value.carbohydratesOn100gr
: carbohydratesOn100gr // ignore: cast_nullable_to_non_nullable
as double,
portionMassGr: null == portionMassGr
? _value.portionMassGr
: portionMassGr // ignore: cast_nullable_to_non_nullable
as int,
energyOnPortion: null == energyOnPortion
? _value.energyOnPortion
: energyOnPortion // ignore: cast_nullable_to_non_nullable
as int,
proteinsOnPortion: null == proteinsOnPortion
? _value.proteinsOnPortion
: proteinsOnPortion // ignore: cast_nullable_to_non_nullable
as int,
fatsOnPortion: null == fatsOnPortion
? _value.fatsOnPortion
: fatsOnPortion // ignore: cast_nullable_to_non_nullable
as int,
carbohydratesOnPortion: null == carbohydratesOnPortion
? _value.carbohydratesOnPortion
: carbohydratesOnPortion // ignore: cast_nullable_to_non_nullable
as int,
createdAt: null == createdAt
? _value.createdAt
: createdAt // ignore: cast_nullable_to_non_nullable
as String,
updatedAt: null == updatedAt
? _value.updatedAt
: updatedAt // ignore: cast_nullable_to_non_nullable
as String,
lastState: null == lastState
? _value.lastState
: lastState // ignore: cast_nullable_to_non_nullable
as String,
reqjectReason: freezed == reqjectReason
? _value.reqjectReason
: reqjectReason // ignore: cast_nullable_to_non_nullable
as String?,
));
}
}
/// @nodoc
@JsonSerializable()
class _$ProductImpl implements _Product {
const _$ProductImpl(
{required this.id,
required this.name,
required this.image,
required this.productGroupId,
required this.description,
required this.formulations,
required this.energyOn100gr,
required this.proteinsOn100gr,
required this.fatsOn100gr,
required this.carbohydratesOn100gr,
required this.portionMassGr,
required this.energyOnPortion,
required this.proteinsOnPortion,
required this.fatsOnPortion,
required this.carbohydratesOnPortion,
required this.createdAt,
required this.updatedAt,
required this.lastState,
this.reqjectReason});
factory _$ProductImpl.fromJson(Map<String, dynamic> json) =>
_$$ProductImplFromJson(json);
@override
final int id;
@override
final String name;
@override
final String image;
@override
final int productGroupId;
@override
final String description;
@override
final String formulations;
@override
final int energyOn100gr;
@override
final double proteinsOn100gr;
@override
final double fatsOn100gr;
@override
final double carbohydratesOn100gr;
@override
final int portionMassGr;
@override
final int energyOnPortion;
@override
final int proteinsOnPortion;
@override
final int fatsOnPortion;
@override
final int carbohydratesOnPortion;
@override
final String createdAt;
@override
final String updatedAt;
@override
final String lastState;
@override
final String? reqjectReason;
@override
String toString() {
return 'Product(id: $id, name: $name, image: $image, productGroupId: $productGroupId, description: $description, formulations: $formulations, energyOn100gr: $energyOn100gr, proteinsOn100gr: $proteinsOn100gr, fatsOn100gr: $fatsOn100gr, carbohydratesOn100gr: $carbohydratesOn100gr, portionMassGr: $portionMassGr, energyOnPortion: $energyOnPortion, proteinsOnPortion: $proteinsOnPortion, fatsOnPortion: $fatsOnPortion, carbohydratesOnPortion: $carbohydratesOnPortion, createdAt: $createdAt, updatedAt: $updatedAt, lastState: $lastState, reqjectReason: $reqjectReason)';
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$ProductImpl &&
(identical(other.id, id) || other.id == id) &&
(identical(other.name, name) || other.name == name) &&
(identical(other.image, image) || other.image == image) &&
(identical(other.productGroupId, productGroupId) ||
other.productGroupId == productGroupId) &&
(identical(other.description, description) ||
other.description == description) &&
(identical(other.formulations, formulations) ||
other.formulations == formulations) &&
(identical(other.energyOn100gr, energyOn100gr) ||
other.energyOn100gr == energyOn100gr) &&
(identical(other.proteinsOn100gr, proteinsOn100gr) ||
other.proteinsOn100gr == proteinsOn100gr) &&
(identical(other.fatsOn100gr, fatsOn100gr) ||
other.fatsOn100gr == fatsOn100gr) &&
(identical(other.carbohydratesOn100gr, carbohydratesOn100gr) ||
other.carbohydratesOn100gr == carbohydratesOn100gr) &&
(identical(other.portionMassGr, portionMassGr) ||
other.portionMassGr == portionMassGr) &&
(identical(other.energyOnPortion, energyOnPortion) ||
other.energyOnPortion == energyOnPortion) &&
(identical(other.proteinsOnPortion, proteinsOnPortion) ||
other.proteinsOnPortion == proteinsOnPortion) &&
(identical(other.fatsOnPortion, fatsOnPortion) ||
other.fatsOnPortion == fatsOnPortion) &&
(identical(other.carbohydratesOnPortion, carbohydratesOnPortion) ||
other.carbohydratesOnPortion == carbohydratesOnPortion) &&
(identical(other.createdAt, createdAt) ||
other.createdAt == createdAt) &&
(identical(other.updatedAt, updatedAt) ||
other.updatedAt == updatedAt) &&
(identical(other.lastState, lastState) ||
other.lastState == lastState) &&
(identical(other.reqjectReason, reqjectReason) ||
other.reqjectReason == reqjectReason));
}
@JsonKey(ignore: true)
@override
int get hashCode => Object.hashAll([
runtimeType,
id,
name,
image,
productGroupId,
description,
formulations,
energyOn100gr,
proteinsOn100gr,
fatsOn100gr,
carbohydratesOn100gr,
portionMassGr,
energyOnPortion,
proteinsOnPortion,
fatsOnPortion,
carbohydratesOnPortion,
createdAt,
updatedAt,
lastState,
reqjectReason
]);
@JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
_$$ProductImplCopyWith<_$ProductImpl> get copyWith =>
__$$ProductImplCopyWithImpl<_$ProductImpl>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$$ProductImplToJson(
this,
);
}
}
abstract class _Product implements Product {
const factory _Product(
{required final int id,
required final String name,
required final String image,
required final int productGroupId,
required final String description,
required final String formulations,
required final int energyOn100gr,
required final double proteinsOn100gr,
required final double fatsOn100gr,
required final double carbohydratesOn100gr,
required final int portionMassGr,
required final int energyOnPortion,
required final int proteinsOnPortion,
required final int fatsOnPortion,
required final int carbohydratesOnPortion,
required final String createdAt,
required final String updatedAt,
required final String lastState,
final String? reqjectReason}) = _$ProductImpl;
factory _Product.fromJson(Map<String, dynamic> json) = _$ProductImpl.fromJson;
@override
int get id;
@override
String get name;
@override
String get image;
@override
int get productGroupId;
@override
String get description;
@override
String get formulations;
@override
int get energyOn100gr;
@override
double get proteinsOn100gr;
@override
double get fatsOn100gr;
@override
double get carbohydratesOn100gr;
@override
int get portionMassGr;
@override
int get energyOnPortion;
@override
int get proteinsOnPortion;
@override
int get fatsOnPortion;
@override
int get carbohydratesOnPortion;
@override
String get createdAt;
@override
String get updatedAt;
@override
String get lastState;
@override
String? get reqjectReason;
@override
@JsonKey(ignore: true)
_$$ProductImplCopyWith<_$ProductImpl> get copyWith =>
throw _privateConstructorUsedError;
}