forked from eatvio/eatvio_app
284 lines
8.5 KiB
Dart
284 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;
|
|
int get closed => throw _privateConstructorUsedError;
|
|
List<Meal> get meals => throw _privateConstructorUsedError;
|
|
String? get comment => throw _privateConstructorUsedError;
|
|
DateTime? get wakeup => throw _privateConstructorUsedError;
|
|
DateTime? get retire => 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,
|
|
int closed,
|
|
List<Meal> meals,
|
|
String? comment,
|
|
DateTime? wakeup,
|
|
DateTime? retire});
|
|
}
|
|
|
|
/// @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? closed = null,
|
|
Object? meals = null,
|
|
Object? comment = freezed,
|
|
Object? wakeup = freezed,
|
|
Object? retire = freezed,
|
|
}) {
|
|
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,
|
|
closed: null == closed
|
|
? _value.closed
|
|
: closed // ignore: cast_nullable_to_non_nullable
|
|
as int,
|
|
meals: null == meals
|
|
? _value.meals
|
|
: meals // ignore: cast_nullable_to_non_nullable
|
|
as List<Meal>,
|
|
comment: freezed == comment
|
|
? _value.comment
|
|
: comment // ignore: cast_nullable_to_non_nullable
|
|
as String?,
|
|
wakeup: freezed == wakeup
|
|
? _value.wakeup
|
|
: wakeup // ignore: cast_nullable_to_non_nullable
|
|
as DateTime?,
|
|
retire: freezed == retire
|
|
? _value.retire
|
|
: retire // ignore: cast_nullable_to_non_nullable
|
|
as DateTime?,
|
|
) 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,
|
|
int closed,
|
|
List<Meal> meals,
|
|
String? comment,
|
|
DateTime? wakeup,
|
|
DateTime? retire});
|
|
}
|
|
|
|
/// @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? closed = null,
|
|
Object? meals = null,
|
|
Object? comment = freezed,
|
|
Object? wakeup = freezed,
|
|
Object? retire = freezed,
|
|
}) {
|
|
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,
|
|
closed: null == closed
|
|
? _value.closed
|
|
: closed // ignore: cast_nullable_to_non_nullable
|
|
as int,
|
|
meals: null == meals
|
|
? _value._meals
|
|
: meals // ignore: cast_nullable_to_non_nullable
|
|
as List<Meal>,
|
|
comment: freezed == comment
|
|
? _value.comment
|
|
: comment // ignore: cast_nullable_to_non_nullable
|
|
as String?,
|
|
wakeup: freezed == wakeup
|
|
? _value.wakeup
|
|
: wakeup // ignore: cast_nullable_to_non_nullable
|
|
as DateTime?,
|
|
retire: freezed == retire
|
|
? _value.retire
|
|
: retire // ignore: cast_nullable_to_non_nullable
|
|
as DateTime?,
|
|
));
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
@JsonSerializable()
|
|
class _$DiaryModelImpl implements _DiaryModel {
|
|
const _$DiaryModelImpl(
|
|
{required this.id,
|
|
required this.date,
|
|
required this.closed,
|
|
required final List<Meal> meals,
|
|
this.comment,
|
|
this.wakeup,
|
|
this.retire})
|
|
: _meals = meals;
|
|
|
|
factory _$DiaryModelImpl.fromJson(Map<String, dynamic> json) =>
|
|
_$$DiaryModelImplFromJson(json);
|
|
|
|
@override
|
|
final int id;
|
|
@override
|
|
final DateTime date;
|
|
@override
|
|
final int closed;
|
|
final List<Meal> _meals;
|
|
@override
|
|
List<Meal> get meals {
|
|
if (_meals is EqualUnmodifiableListView) return _meals;
|
|
// ignore: implicit_dynamic_type
|
|
return EqualUnmodifiableListView(_meals);
|
|
}
|
|
|
|
@override
|
|
final String? comment;
|
|
@override
|
|
final DateTime? wakeup;
|
|
@override
|
|
final DateTime? retire;
|
|
|
|
@override
|
|
String toString() {
|
|
return 'DiaryModel(id: $id, date: $date, closed: $closed, meals: $meals, comment: $comment, wakeup: $wakeup, retire: $retire)';
|
|
}
|
|
|
|
@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.closed, closed) || other.closed == closed) &&
|
|
const DeepCollectionEquality().equals(other._meals, _meals) &&
|
|
(identical(other.comment, comment) || other.comment == comment) &&
|
|
(identical(other.wakeup, wakeup) || other.wakeup == wakeup) &&
|
|
(identical(other.retire, retire) || other.retire == retire));
|
|
}
|
|
|
|
@JsonKey(ignore: true)
|
|
@override
|
|
int get hashCode => Object.hash(runtimeType, id, date, closed,
|
|
const DeepCollectionEquality().hash(_meals), comment, wakeup, retire);
|
|
|
|
@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 int closed,
|
|
required final List<Meal> meals,
|
|
final String? comment,
|
|
final DateTime? wakeup,
|
|
final DateTime? retire}) = _$DiaryModelImpl;
|
|
|
|
factory _DiaryModel.fromJson(Map<String, dynamic> json) =
|
|
_$DiaryModelImpl.fromJson;
|
|
|
|
@override
|
|
int get id;
|
|
@override
|
|
DateTime get date;
|
|
@override
|
|
int get closed;
|
|
@override
|
|
List<Meal> get meals;
|
|
@override
|
|
String? get comment;
|
|
@override
|
|
DateTime? get wakeup;
|
|
@override
|
|
DateTime? get retire;
|
|
@override
|
|
@JsonKey(ignore: true)
|
|
_$$DiaryModelImplCopyWith<_$DiaryModelImpl> get copyWith =>
|
|
throw _privateConstructorUsedError;
|
|
}
|