207 lines
6.3 KiB
Dart
207 lines
6.3 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 'portion.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');
|
|
|
|
Portion _$PortionFromJson(Map<String, dynamic> json) {
|
|
return _Portion.fromJson(json);
|
|
}
|
|
|
|
/// @nodoc
|
|
mixin _$Portion {
|
|
int get id => throw _privateConstructorUsedError;
|
|
String get product_name => throw _privateConstructorUsedError;
|
|
int get quantity => throw _privateConstructorUsedError;
|
|
String get portion => throw _privateConstructorUsedError;
|
|
|
|
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
|
@JsonKey(ignore: true)
|
|
$PortionCopyWith<Portion> get copyWith => throw _privateConstructorUsedError;
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract class $PortionCopyWith<$Res> {
|
|
factory $PortionCopyWith(Portion value, $Res Function(Portion) then) =
|
|
_$PortionCopyWithImpl<$Res, Portion>;
|
|
@useResult
|
|
$Res call({int id, String product_name, int quantity, String portion});
|
|
}
|
|
|
|
/// @nodoc
|
|
class _$PortionCopyWithImpl<$Res, $Val extends Portion>
|
|
implements $PortionCopyWith<$Res> {
|
|
_$PortionCopyWithImpl(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? product_name = null,
|
|
Object? quantity = null,
|
|
Object? portion = null,
|
|
}) {
|
|
return _then(_value.copyWith(
|
|
id: null == id
|
|
? _value.id
|
|
: id // ignore: cast_nullable_to_non_nullable
|
|
as int,
|
|
product_name: null == product_name
|
|
? _value.product_name
|
|
: product_name // ignore: cast_nullable_to_non_nullable
|
|
as String,
|
|
quantity: null == quantity
|
|
? _value.quantity
|
|
: quantity // ignore: cast_nullable_to_non_nullable
|
|
as int,
|
|
portion: null == portion
|
|
? _value.portion
|
|
: portion // ignore: cast_nullable_to_non_nullable
|
|
as String,
|
|
) as $Val);
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract class _$$PortionImplCopyWith<$Res> implements $PortionCopyWith<$Res> {
|
|
factory _$$PortionImplCopyWith(
|
|
_$PortionImpl value, $Res Function(_$PortionImpl) then) =
|
|
__$$PortionImplCopyWithImpl<$Res>;
|
|
@override
|
|
@useResult
|
|
$Res call({int id, String product_name, int quantity, String portion});
|
|
}
|
|
|
|
/// @nodoc
|
|
class __$$PortionImplCopyWithImpl<$Res>
|
|
extends _$PortionCopyWithImpl<$Res, _$PortionImpl>
|
|
implements _$$PortionImplCopyWith<$Res> {
|
|
__$$PortionImplCopyWithImpl(
|
|
_$PortionImpl _value, $Res Function(_$PortionImpl) _then)
|
|
: super(_value, _then);
|
|
|
|
@pragma('vm:prefer-inline')
|
|
@override
|
|
$Res call({
|
|
Object? id = null,
|
|
Object? product_name = null,
|
|
Object? quantity = null,
|
|
Object? portion = null,
|
|
}) {
|
|
return _then(_$PortionImpl(
|
|
id: null == id
|
|
? _value.id
|
|
: id // ignore: cast_nullable_to_non_nullable
|
|
as int,
|
|
product_name: null == product_name
|
|
? _value.product_name
|
|
: product_name // ignore: cast_nullable_to_non_nullable
|
|
as String,
|
|
quantity: null == quantity
|
|
? _value.quantity
|
|
: quantity // ignore: cast_nullable_to_non_nullable
|
|
as int,
|
|
portion: null == portion
|
|
? _value.portion
|
|
: portion // ignore: cast_nullable_to_non_nullable
|
|
as String,
|
|
));
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
@JsonSerializable()
|
|
class _$PortionImpl implements _Portion {
|
|
const _$PortionImpl(
|
|
{required this.id,
|
|
required this.product_name,
|
|
required this.quantity,
|
|
required this.portion});
|
|
|
|
factory _$PortionImpl.fromJson(Map<String, dynamic> json) =>
|
|
_$$PortionImplFromJson(json);
|
|
|
|
@override
|
|
final int id;
|
|
@override
|
|
final String product_name;
|
|
@override
|
|
final int quantity;
|
|
@override
|
|
final String portion;
|
|
|
|
@override
|
|
String toString() {
|
|
return 'Portion(id: $id, product_name: $product_name, quantity: $quantity, portion: $portion)';
|
|
}
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
return identical(this, other) ||
|
|
(other.runtimeType == runtimeType &&
|
|
other is _$PortionImpl &&
|
|
(identical(other.id, id) || other.id == id) &&
|
|
(identical(other.product_name, product_name) ||
|
|
other.product_name == product_name) &&
|
|
(identical(other.quantity, quantity) ||
|
|
other.quantity == quantity) &&
|
|
(identical(other.portion, portion) || other.portion == portion));
|
|
}
|
|
|
|
@JsonKey(ignore: true)
|
|
@override
|
|
int get hashCode =>
|
|
Object.hash(runtimeType, id, product_name, quantity, portion);
|
|
|
|
@JsonKey(ignore: true)
|
|
@override
|
|
@pragma('vm:prefer-inline')
|
|
_$$PortionImplCopyWith<_$PortionImpl> get copyWith =>
|
|
__$$PortionImplCopyWithImpl<_$PortionImpl>(this, _$identity);
|
|
|
|
@override
|
|
Map<String, dynamic> toJson() {
|
|
return _$$PortionImplToJson(
|
|
this,
|
|
);
|
|
}
|
|
}
|
|
|
|
abstract class _Portion implements Portion {
|
|
const factory _Portion(
|
|
{required final int id,
|
|
required final String product_name,
|
|
required final int quantity,
|
|
required final String portion}) = _$PortionImpl;
|
|
|
|
factory _Portion.fromJson(Map<String, dynamic> json) = _$PortionImpl.fromJson;
|
|
|
|
@override
|
|
int get id;
|
|
@override
|
|
String get product_name;
|
|
@override
|
|
int get quantity;
|
|
@override
|
|
String get portion;
|
|
@override
|
|
@JsonKey(ignore: true)
|
|
_$$PortionImplCopyWith<_$PortionImpl> get copyWith =>
|
|
throw _privateConstructorUsedError;
|
|
}
|