Files
eatvio_app_old/lib/features/diary/models/meal.freezed.dart

292 lines
8.4 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 'meal.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');
Meal _$MealFromJson(Map<String, dynamic> json) {
return _Meal.fromJson(json);
}
/// @nodoc
mixin _$Meal {
int get id => throw _privateConstructorUsedError;
String get time => throw _privateConstructorUsedError;
int get type => throw _privateConstructorUsedError;
int get satiety => throw _privateConstructorUsedError;
int get mood => throw _privateConstructorUsedError;
List<Portion> get portions => throw _privateConstructorUsedError;
List<Photo> get photos => throw _privateConstructorUsedError;
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
@JsonKey(ignore: true)
$MealCopyWith<Meal> get copyWith => throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $MealCopyWith<$Res> {
factory $MealCopyWith(Meal value, $Res Function(Meal) then) =
_$MealCopyWithImpl<$Res, Meal>;
@useResult
$Res call(
{int id,
String time,
int type,
int satiety,
int mood,
List<Portion> portions,
List<Photo> photos});
}
/// @nodoc
class _$MealCopyWithImpl<$Res, $Val extends Meal>
implements $MealCopyWith<$Res> {
_$MealCopyWithImpl(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? time = null,
Object? type = null,
Object? satiety = null,
Object? mood = null,
Object? portions = null,
Object? photos = null,
}) {
return _then(_value.copyWith(
id: null == id
? _value.id
: id // ignore: cast_nullable_to_non_nullable
as int,
time: null == time
? _value.time
: time // ignore: cast_nullable_to_non_nullable
as String,
type: null == type
? _value.type
: type // ignore: cast_nullable_to_non_nullable
as int,
satiety: null == satiety
? _value.satiety
: satiety // ignore: cast_nullable_to_non_nullable
as int,
mood: null == mood
? _value.mood
: mood // ignore: cast_nullable_to_non_nullable
as int,
portions: null == portions
? _value.portions
: portions // ignore: cast_nullable_to_non_nullable
as List<Portion>,
photos: null == photos
? _value.photos
: photos // ignore: cast_nullable_to_non_nullable
as List<Photo>,
) as $Val);
}
}
/// @nodoc
abstract class _$$MealImplCopyWith<$Res> implements $MealCopyWith<$Res> {
factory _$$MealImplCopyWith(
_$MealImpl value, $Res Function(_$MealImpl) then) =
__$$MealImplCopyWithImpl<$Res>;
@override
@useResult
$Res call(
{int id,
String time,
int type,
int satiety,
int mood,
List<Portion> portions,
List<Photo> photos});
}
/// @nodoc
class __$$MealImplCopyWithImpl<$Res>
extends _$MealCopyWithImpl<$Res, _$MealImpl>
implements _$$MealImplCopyWith<$Res> {
__$$MealImplCopyWithImpl(_$MealImpl _value, $Res Function(_$MealImpl) _then)
: super(_value, _then);
@pragma('vm:prefer-inline')
@override
$Res call({
Object? id = null,
Object? time = null,
Object? type = null,
Object? satiety = null,
Object? mood = null,
Object? portions = null,
Object? photos = null,
}) {
return _then(_$MealImpl(
id: null == id
? _value.id
: id // ignore: cast_nullable_to_non_nullable
as int,
time: null == time
? _value.time
: time // ignore: cast_nullable_to_non_nullable
as String,
type: null == type
? _value.type
: type // ignore: cast_nullable_to_non_nullable
as int,
satiety: null == satiety
? _value.satiety
: satiety // ignore: cast_nullable_to_non_nullable
as int,
mood: null == mood
? _value.mood
: mood // ignore: cast_nullable_to_non_nullable
as int,
portions: null == portions
? _value._portions
: portions // ignore: cast_nullable_to_non_nullable
as List<Portion>,
photos: null == photos
? _value._photos
: photos // ignore: cast_nullable_to_non_nullable
as List<Photo>,
));
}
}
/// @nodoc
@JsonSerializable()
class _$MealImpl implements _Meal {
const _$MealImpl(
{required this.id,
required this.time,
required this.type,
required this.satiety,
required this.mood,
required final List<Portion> portions,
required final List<Photo> photos})
: _portions = portions,
_photos = photos;
factory _$MealImpl.fromJson(Map<String, dynamic> json) =>
_$$MealImplFromJson(json);
@override
final int id;
@override
final String time;
@override
final int type;
@override
final int satiety;
@override
final int mood;
final List<Portion> _portions;
@override
List<Portion> get portions {
if (_portions is EqualUnmodifiableListView) return _portions;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView(_portions);
}
final List<Photo> _photos;
@override
List<Photo> get photos {
if (_photos is EqualUnmodifiableListView) return _photos;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView(_photos);
}
@override
String toString() {
return 'Meal(id: $id, time: $time, type: $type, satiety: $satiety, mood: $mood, portions: $portions, photos: $photos)';
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$MealImpl &&
(identical(other.id, id) || other.id == id) &&
(identical(other.time, time) || other.time == time) &&
(identical(other.type, type) || other.type == type) &&
(identical(other.satiety, satiety) || other.satiety == satiety) &&
(identical(other.mood, mood) || other.mood == mood) &&
const DeepCollectionEquality().equals(other._portions, _portions) &&
const DeepCollectionEquality().equals(other._photos, _photos));
}
@JsonKey(ignore: true)
@override
int get hashCode => Object.hash(
runtimeType,
id,
time,
type,
satiety,
mood,
const DeepCollectionEquality().hash(_portions),
const DeepCollectionEquality().hash(_photos));
@JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
_$$MealImplCopyWith<_$MealImpl> get copyWith =>
__$$MealImplCopyWithImpl<_$MealImpl>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$$MealImplToJson(
this,
);
}
}
abstract class _Meal implements Meal {
const factory _Meal(
{required final int id,
required final String time,
required final int type,
required final int satiety,
required final int mood,
required final List<Portion> portions,
required final List<Photo> photos}) = _$MealImpl;
factory _Meal.fromJson(Map<String, dynamic> json) = _$MealImpl.fromJson;
@override
int get id;
@override
String get time;
@override
int get type;
@override
int get satiety;
@override
int get mood;
@override
List<Portion> get portions;
@override
List<Photo> get photos;
@override
@JsonKey(ignore: true)
_$$MealImplCopyWith<_$MealImpl> get copyWith =>
throw _privateConstructorUsedError;
}