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

283 lines
8.5 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 'diary_model.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');
DiaryModel _$DiaryModelFromJson(Map<String, dynamic> json) {
return _DiaryModel.fromJson(json);
}
/// @nodoc
mixin _$DiaryModel {
int get id => throw _privateConstructorUsedError;
DateTime get date => throw _privateConstructorUsedError;
DateTime get wakeup => throw _privateConstructorUsedError;
DateTime get retire => throw _privateConstructorUsedError;
int get closed => throw _privateConstructorUsedError;
String get comment => throw _privateConstructorUsedError;
List<Meals> get meals => throw _privateConstructorUsedError;
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
@JsonKey(ignore: true)
$DiaryModelCopyWith<DiaryModel> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $DiaryModelCopyWith<$Res> {
factory $DiaryModelCopyWith(
DiaryModel value, $Res Function(DiaryModel) then) =
_$DiaryModelCopyWithImpl<$Res, DiaryModel>;
@useResult
$Res call(
{int id,
DateTime date,
DateTime wakeup,
DateTime retire,
int closed,
String comment,
List<Meals> meals});
}
/// @nodoc
class _$DiaryModelCopyWithImpl<$Res, $Val extends DiaryModel>
implements $DiaryModelCopyWith<$Res> {
_$DiaryModelCopyWithImpl(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? date = null,
Object? wakeup = null,
Object? retire = null,
Object? closed = null,
Object? comment = null,
Object? meals = null,
}) {
return _then(_value.copyWith(
id: null == id
? _value.id
: id // ignore: cast_nullable_to_non_nullable
as int,
date: null == date
? _value.date
: date // ignore: cast_nullable_to_non_nullable
as DateTime,
wakeup: null == wakeup
? _value.wakeup
: wakeup // ignore: cast_nullable_to_non_nullable
as DateTime,
retire: null == retire
? _value.retire
: retire // ignore: cast_nullable_to_non_nullable
as DateTime,
closed: null == closed
? _value.closed
: closed // ignore: cast_nullable_to_non_nullable
as int,
comment: null == comment
? _value.comment
: comment // ignore: cast_nullable_to_non_nullable
as String,
meals: null == meals
? _value.meals
: meals // ignore: cast_nullable_to_non_nullable
as List<Meals>,
) as $Val);
}
}
/// @nodoc
abstract class _$$DiaryModelImplCopyWith<$Res>
implements $DiaryModelCopyWith<$Res> {
factory _$$DiaryModelImplCopyWith(
_$DiaryModelImpl value, $Res Function(_$DiaryModelImpl) then) =
__$$DiaryModelImplCopyWithImpl<$Res>;
@override
@useResult
$Res call(
{int id,
DateTime date,
DateTime wakeup,
DateTime retire,
int closed,
String comment,
List<Meals> meals});
}
/// @nodoc
class __$$DiaryModelImplCopyWithImpl<$Res>
extends _$DiaryModelCopyWithImpl<$Res, _$DiaryModelImpl>
implements _$$DiaryModelImplCopyWith<$Res> {
__$$DiaryModelImplCopyWithImpl(
_$DiaryModelImpl _value, $Res Function(_$DiaryModelImpl) _then)
: super(_value, _then);
@pragma('vm:prefer-inline')
@override
$Res call({
Object? id = null,
Object? date = null,
Object? wakeup = null,
Object? retire = null,
Object? closed = null,
Object? comment = null,
Object? meals = null,
}) {
return _then(_$DiaryModelImpl(
id: null == id
? _value.id
: id // ignore: cast_nullable_to_non_nullable
as int,
date: null == date
? _value.date
: date // ignore: cast_nullable_to_non_nullable
as DateTime,
wakeup: null == wakeup
? _value.wakeup
: wakeup // ignore: cast_nullable_to_non_nullable
as DateTime,
retire: null == retire
? _value.retire
: retire // ignore: cast_nullable_to_non_nullable
as DateTime,
closed: null == closed
? _value.closed
: closed // ignore: cast_nullable_to_non_nullable
as int,
comment: null == comment
? _value.comment
: comment // ignore: cast_nullable_to_non_nullable
as String,
meals: null == meals
? _value._meals
: meals // ignore: cast_nullable_to_non_nullable
as List<Meals>,
));
}
}
/// @nodoc
@JsonSerializable()
class _$DiaryModelImpl implements _DiaryModel {
const _$DiaryModelImpl(
{required this.id,
required this.date,
required this.wakeup,
required this.retire,
required this.closed,
required this.comment,
required final List<Meals> meals})
: _meals = meals;
factory _$DiaryModelImpl.fromJson(Map<String, dynamic> json) =>
_$$DiaryModelImplFromJson(json);
@override
final int id;
@override
final DateTime date;
@override
final DateTime wakeup;
@override
final DateTime retire;
@override
final int closed;
@override
final String comment;
final List<Meals> _meals;
@override
List<Meals> get meals {
if (_meals is EqualUnmodifiableListView) return _meals;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView(_meals);
}
@override
String toString() {
return 'DiaryModel(id: $id, date: $date, wakeup: $wakeup, retire: $retire, closed: $closed, comment: $comment, meals: $meals)';
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$DiaryModelImpl &&
(identical(other.id, id) || other.id == id) &&
(identical(other.date, date) || other.date == date) &&
(identical(other.wakeup, wakeup) || other.wakeup == wakeup) &&
(identical(other.retire, retire) || other.retire == retire) &&
(identical(other.closed, closed) || other.closed == closed) &&
(identical(other.comment, comment) || other.comment == comment) &&
const DeepCollectionEquality().equals(other._meals, _meals));
}
@JsonKey(ignore: true)
@override
int get hashCode => Object.hash(runtimeType, id, date, wakeup, retire, closed,
comment, const DeepCollectionEquality().hash(_meals));
@JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
_$$DiaryModelImplCopyWith<_$DiaryModelImpl> get copyWith =>
__$$DiaryModelImplCopyWithImpl<_$DiaryModelImpl>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$$DiaryModelImplToJson(
this,
);
}
}
abstract class _DiaryModel implements DiaryModel {
const factory _DiaryModel(
{required final int id,
required final DateTime date,
required final DateTime wakeup,
required final DateTime retire,
required final int closed,
required final String comment,
required final List<Meals> meals}) = _$DiaryModelImpl;
factory _DiaryModel.fromJson(Map<String, dynamic> json) =
_$DiaryModelImpl.fromJson;
@override
int get id;
@override
DateTime get date;
@override
DateTime get wakeup;
@override
DateTime get retire;
@override
int get closed;
@override
String get comment;
@override
List<Meals> get meals;
@override
@JsonKey(ignore: true)
_$$DiaryModelImplCopyWith<_$DiaryModelImpl> get copyWith =>
throw _privateConstructorUsedError;
}