forked from eatvio/eatvio_app
1698 lines
60 KiB
Dart
1698 lines
60 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_state.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');
|
|
|
|
/// @nodoc
|
|
mixin _$DiaryState {
|
|
@optionalTypeArgs
|
|
TResult when<TResult extends Object?>(
|
|
TResult Function() $default, {
|
|
required TResult Function(int? id) loading,
|
|
required TResult Function(
|
|
DiaryModel diary,
|
|
String? diaryDate,
|
|
List<int> recommendedChartValues,
|
|
List<int> consumedChartValues,
|
|
List<Portion> portions,
|
|
List<SelectionPopupModel> mealList,
|
|
List<SelectionPopupModel> portionList,
|
|
List<Product> autocompleteList,
|
|
Map<String, dynamic> chartData,
|
|
Meal currentMeal,
|
|
SelectionPopupModel portionController,
|
|
TimeOfDay wakeupController,
|
|
TimeOfDay retireController,
|
|
TimeOfDay? mealTimeController,
|
|
TextEditingController commentController,
|
|
TextEditingController product_nameController,
|
|
TextEditingController productQuantityController,
|
|
TextEditingController caloriesController,
|
|
TextEditingController fatsController,
|
|
TextEditingController proteinsController,
|
|
TextEditingController carbsController,
|
|
int selectedMood,
|
|
int selectedSatiety,
|
|
bool wakeupExpanded,
|
|
bool moderationExpanded,
|
|
bool moodExpanded,
|
|
bool isLoading,
|
|
bool isAdded,
|
|
List<NutritionData>? chartDataCounted)
|
|
loaded,
|
|
required TResult Function(String errorMessage) error,
|
|
}) =>
|
|
throw _privateConstructorUsedError;
|
|
@optionalTypeArgs
|
|
TResult? whenOrNull<TResult extends Object?>(
|
|
TResult? Function()? $default, {
|
|
TResult? Function(int? id)? loading,
|
|
TResult? Function(
|
|
DiaryModel diary,
|
|
String? diaryDate,
|
|
List<int> recommendedChartValues,
|
|
List<int> consumedChartValues,
|
|
List<Portion> portions,
|
|
List<SelectionPopupModel> mealList,
|
|
List<SelectionPopupModel> portionList,
|
|
List<Product> autocompleteList,
|
|
Map<String, dynamic> chartData,
|
|
Meal currentMeal,
|
|
SelectionPopupModel portionController,
|
|
TimeOfDay wakeupController,
|
|
TimeOfDay retireController,
|
|
TimeOfDay? mealTimeController,
|
|
TextEditingController commentController,
|
|
TextEditingController product_nameController,
|
|
TextEditingController productQuantityController,
|
|
TextEditingController caloriesController,
|
|
TextEditingController fatsController,
|
|
TextEditingController proteinsController,
|
|
TextEditingController carbsController,
|
|
int selectedMood,
|
|
int selectedSatiety,
|
|
bool wakeupExpanded,
|
|
bool moderationExpanded,
|
|
bool moodExpanded,
|
|
bool isLoading,
|
|
bool isAdded,
|
|
List<NutritionData>? chartDataCounted)?
|
|
loaded,
|
|
TResult? Function(String errorMessage)? error,
|
|
}) =>
|
|
throw _privateConstructorUsedError;
|
|
@optionalTypeArgs
|
|
TResult maybeWhen<TResult extends Object?>(
|
|
TResult Function()? $default, {
|
|
TResult Function(int? id)? loading,
|
|
TResult Function(
|
|
DiaryModel diary,
|
|
String? diaryDate,
|
|
List<int> recommendedChartValues,
|
|
List<int> consumedChartValues,
|
|
List<Portion> portions,
|
|
List<SelectionPopupModel> mealList,
|
|
List<SelectionPopupModel> portionList,
|
|
List<Product> autocompleteList,
|
|
Map<String, dynamic> chartData,
|
|
Meal currentMeal,
|
|
SelectionPopupModel portionController,
|
|
TimeOfDay wakeupController,
|
|
TimeOfDay retireController,
|
|
TimeOfDay? mealTimeController,
|
|
TextEditingController commentController,
|
|
TextEditingController product_nameController,
|
|
TextEditingController productQuantityController,
|
|
TextEditingController caloriesController,
|
|
TextEditingController fatsController,
|
|
TextEditingController proteinsController,
|
|
TextEditingController carbsController,
|
|
int selectedMood,
|
|
int selectedSatiety,
|
|
bool wakeupExpanded,
|
|
bool moderationExpanded,
|
|
bool moodExpanded,
|
|
bool isLoading,
|
|
bool isAdded,
|
|
List<NutritionData>? chartDataCounted)?
|
|
loaded,
|
|
TResult Function(String errorMessage)? error,
|
|
required TResult orElse(),
|
|
}) =>
|
|
throw _privateConstructorUsedError;
|
|
@optionalTypeArgs
|
|
TResult map<TResult extends Object?>(
|
|
TResult Function(_DiaryState value) $default, {
|
|
required TResult Function(DiaryStateLoading value) loading,
|
|
required TResult Function(DiaryStateLoaded value) loaded,
|
|
required TResult Function(DiaryStateError value) error,
|
|
}) =>
|
|
throw _privateConstructorUsedError;
|
|
@optionalTypeArgs
|
|
TResult? mapOrNull<TResult extends Object?>(
|
|
TResult? Function(_DiaryState value)? $default, {
|
|
TResult? Function(DiaryStateLoading value)? loading,
|
|
TResult? Function(DiaryStateLoaded value)? loaded,
|
|
TResult? Function(DiaryStateError value)? error,
|
|
}) =>
|
|
throw _privateConstructorUsedError;
|
|
@optionalTypeArgs
|
|
TResult maybeMap<TResult extends Object?>(
|
|
TResult Function(_DiaryState value)? $default, {
|
|
TResult Function(DiaryStateLoading value)? loading,
|
|
TResult Function(DiaryStateLoaded value)? loaded,
|
|
TResult Function(DiaryStateError value)? error,
|
|
required TResult orElse(),
|
|
}) =>
|
|
throw _privateConstructorUsedError;
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract class $DiaryStateCopyWith<$Res> {
|
|
factory $DiaryStateCopyWith(
|
|
DiaryState value, $Res Function(DiaryState) then) =
|
|
_$DiaryStateCopyWithImpl<$Res, DiaryState>;
|
|
}
|
|
|
|
/// @nodoc
|
|
class _$DiaryStateCopyWithImpl<$Res, $Val extends DiaryState>
|
|
implements $DiaryStateCopyWith<$Res> {
|
|
_$DiaryStateCopyWithImpl(this._value, this._then);
|
|
|
|
// ignore: unused_field
|
|
final $Val _value;
|
|
// ignore: unused_field
|
|
final $Res Function($Val) _then;
|
|
|
|
/// Create a copy of DiaryState
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract class _$$DiaryStateImplCopyWith<$Res> {
|
|
factory _$$DiaryStateImplCopyWith(
|
|
_$DiaryStateImpl value, $Res Function(_$DiaryStateImpl) then) =
|
|
__$$DiaryStateImplCopyWithImpl<$Res>;
|
|
}
|
|
|
|
/// @nodoc
|
|
class __$$DiaryStateImplCopyWithImpl<$Res>
|
|
extends _$DiaryStateCopyWithImpl<$Res, _$DiaryStateImpl>
|
|
implements _$$DiaryStateImplCopyWith<$Res> {
|
|
__$$DiaryStateImplCopyWithImpl(
|
|
_$DiaryStateImpl _value, $Res Function(_$DiaryStateImpl) _then)
|
|
: super(_value, _then);
|
|
|
|
/// Create a copy of DiaryState
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
}
|
|
|
|
/// @nodoc
|
|
|
|
class _$DiaryStateImpl implements _DiaryState {
|
|
const _$DiaryStateImpl();
|
|
|
|
@override
|
|
String toString() {
|
|
return 'DiaryState()';
|
|
}
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
return identical(this, other) ||
|
|
(other.runtimeType == runtimeType && other is _$DiaryStateImpl);
|
|
}
|
|
|
|
@override
|
|
int get hashCode => runtimeType.hashCode;
|
|
|
|
@override
|
|
@optionalTypeArgs
|
|
TResult when<TResult extends Object?>(
|
|
TResult Function() $default, {
|
|
required TResult Function(int? id) loading,
|
|
required TResult Function(
|
|
DiaryModel diary,
|
|
String? diaryDate,
|
|
List<int> recommendedChartValues,
|
|
List<int> consumedChartValues,
|
|
List<Portion> portions,
|
|
List<SelectionPopupModel> mealList,
|
|
List<SelectionPopupModel> portionList,
|
|
List<Product> autocompleteList,
|
|
Map<String, dynamic> chartData,
|
|
Meal currentMeal,
|
|
SelectionPopupModel portionController,
|
|
TimeOfDay wakeupController,
|
|
TimeOfDay retireController,
|
|
TimeOfDay? mealTimeController,
|
|
TextEditingController commentController,
|
|
TextEditingController product_nameController,
|
|
TextEditingController productQuantityController,
|
|
TextEditingController caloriesController,
|
|
TextEditingController fatsController,
|
|
TextEditingController proteinsController,
|
|
TextEditingController carbsController,
|
|
int selectedMood,
|
|
int selectedSatiety,
|
|
bool wakeupExpanded,
|
|
bool moderationExpanded,
|
|
bool moodExpanded,
|
|
bool isLoading,
|
|
bool isAdded,
|
|
List<NutritionData>? chartDataCounted)
|
|
loaded,
|
|
required TResult Function(String errorMessage) error,
|
|
}) {
|
|
return $default();
|
|
}
|
|
|
|
@override
|
|
@optionalTypeArgs
|
|
TResult? whenOrNull<TResult extends Object?>(
|
|
TResult? Function()? $default, {
|
|
TResult? Function(int? id)? loading,
|
|
TResult? Function(
|
|
DiaryModel diary,
|
|
String? diaryDate,
|
|
List<int> recommendedChartValues,
|
|
List<int> consumedChartValues,
|
|
List<Portion> portions,
|
|
List<SelectionPopupModel> mealList,
|
|
List<SelectionPopupModel> portionList,
|
|
List<Product> autocompleteList,
|
|
Map<String, dynamic> chartData,
|
|
Meal currentMeal,
|
|
SelectionPopupModel portionController,
|
|
TimeOfDay wakeupController,
|
|
TimeOfDay retireController,
|
|
TimeOfDay? mealTimeController,
|
|
TextEditingController commentController,
|
|
TextEditingController product_nameController,
|
|
TextEditingController productQuantityController,
|
|
TextEditingController caloriesController,
|
|
TextEditingController fatsController,
|
|
TextEditingController proteinsController,
|
|
TextEditingController carbsController,
|
|
int selectedMood,
|
|
int selectedSatiety,
|
|
bool wakeupExpanded,
|
|
bool moderationExpanded,
|
|
bool moodExpanded,
|
|
bool isLoading,
|
|
bool isAdded,
|
|
List<NutritionData>? chartDataCounted)?
|
|
loaded,
|
|
TResult? Function(String errorMessage)? error,
|
|
}) {
|
|
return $default?.call();
|
|
}
|
|
|
|
@override
|
|
@optionalTypeArgs
|
|
TResult maybeWhen<TResult extends Object?>(
|
|
TResult Function()? $default, {
|
|
TResult Function(int? id)? loading,
|
|
TResult Function(
|
|
DiaryModel diary,
|
|
String? diaryDate,
|
|
List<int> recommendedChartValues,
|
|
List<int> consumedChartValues,
|
|
List<Portion> portions,
|
|
List<SelectionPopupModel> mealList,
|
|
List<SelectionPopupModel> portionList,
|
|
List<Product> autocompleteList,
|
|
Map<String, dynamic> chartData,
|
|
Meal currentMeal,
|
|
SelectionPopupModel portionController,
|
|
TimeOfDay wakeupController,
|
|
TimeOfDay retireController,
|
|
TimeOfDay? mealTimeController,
|
|
TextEditingController commentController,
|
|
TextEditingController product_nameController,
|
|
TextEditingController productQuantityController,
|
|
TextEditingController caloriesController,
|
|
TextEditingController fatsController,
|
|
TextEditingController proteinsController,
|
|
TextEditingController carbsController,
|
|
int selectedMood,
|
|
int selectedSatiety,
|
|
bool wakeupExpanded,
|
|
bool moderationExpanded,
|
|
bool moodExpanded,
|
|
bool isLoading,
|
|
bool isAdded,
|
|
List<NutritionData>? chartDataCounted)?
|
|
loaded,
|
|
TResult Function(String errorMessage)? error,
|
|
required TResult orElse(),
|
|
}) {
|
|
if ($default != null) {
|
|
return $default();
|
|
}
|
|
return orElse();
|
|
}
|
|
|
|
@override
|
|
@optionalTypeArgs
|
|
TResult map<TResult extends Object?>(
|
|
TResult Function(_DiaryState value) $default, {
|
|
required TResult Function(DiaryStateLoading value) loading,
|
|
required TResult Function(DiaryStateLoaded value) loaded,
|
|
required TResult Function(DiaryStateError value) error,
|
|
}) {
|
|
return $default(this);
|
|
}
|
|
|
|
@override
|
|
@optionalTypeArgs
|
|
TResult? mapOrNull<TResult extends Object?>(
|
|
TResult? Function(_DiaryState value)? $default, {
|
|
TResult? Function(DiaryStateLoading value)? loading,
|
|
TResult? Function(DiaryStateLoaded value)? loaded,
|
|
TResult? Function(DiaryStateError value)? error,
|
|
}) {
|
|
return $default?.call(this);
|
|
}
|
|
|
|
@override
|
|
@optionalTypeArgs
|
|
TResult maybeMap<TResult extends Object?>(
|
|
TResult Function(_DiaryState value)? $default, {
|
|
TResult Function(DiaryStateLoading value)? loading,
|
|
TResult Function(DiaryStateLoaded value)? loaded,
|
|
TResult Function(DiaryStateError value)? error,
|
|
required TResult orElse(),
|
|
}) {
|
|
if ($default != null) {
|
|
return $default(this);
|
|
}
|
|
return orElse();
|
|
}
|
|
}
|
|
|
|
abstract class _DiaryState implements DiaryState {
|
|
const factory _DiaryState() = _$DiaryStateImpl;
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract class _$$DiaryStateLoadingImplCopyWith<$Res> {
|
|
factory _$$DiaryStateLoadingImplCopyWith(_$DiaryStateLoadingImpl value,
|
|
$Res Function(_$DiaryStateLoadingImpl) then) =
|
|
__$$DiaryStateLoadingImplCopyWithImpl<$Res>;
|
|
@useResult
|
|
$Res call({int? id});
|
|
}
|
|
|
|
/// @nodoc
|
|
class __$$DiaryStateLoadingImplCopyWithImpl<$Res>
|
|
extends _$DiaryStateCopyWithImpl<$Res, _$DiaryStateLoadingImpl>
|
|
implements _$$DiaryStateLoadingImplCopyWith<$Res> {
|
|
__$$DiaryStateLoadingImplCopyWithImpl(_$DiaryStateLoadingImpl _value,
|
|
$Res Function(_$DiaryStateLoadingImpl) _then)
|
|
: super(_value, _then);
|
|
|
|
/// Create a copy of DiaryState
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@pragma('vm:prefer-inline')
|
|
@override
|
|
$Res call({
|
|
Object? id = freezed,
|
|
}) {
|
|
return _then(_$DiaryStateLoadingImpl(
|
|
id: freezed == id
|
|
? _value.id
|
|
: id // ignore: cast_nullable_to_non_nullable
|
|
as int?,
|
|
));
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
|
|
class _$DiaryStateLoadingImpl implements DiaryStateLoading {
|
|
const _$DiaryStateLoadingImpl({this.id});
|
|
|
|
@override
|
|
final int? id;
|
|
|
|
@override
|
|
String toString() {
|
|
return 'DiaryState.loading(id: $id)';
|
|
}
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
return identical(this, other) ||
|
|
(other.runtimeType == runtimeType &&
|
|
other is _$DiaryStateLoadingImpl &&
|
|
(identical(other.id, id) || other.id == id));
|
|
}
|
|
|
|
@override
|
|
int get hashCode => Object.hash(runtimeType, id);
|
|
|
|
/// Create a copy of DiaryState
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@override
|
|
@pragma('vm:prefer-inline')
|
|
_$$DiaryStateLoadingImplCopyWith<_$DiaryStateLoadingImpl> get copyWith =>
|
|
__$$DiaryStateLoadingImplCopyWithImpl<_$DiaryStateLoadingImpl>(
|
|
this, _$identity);
|
|
|
|
@override
|
|
@optionalTypeArgs
|
|
TResult when<TResult extends Object?>(
|
|
TResult Function() $default, {
|
|
required TResult Function(int? id) loading,
|
|
required TResult Function(
|
|
DiaryModel diary,
|
|
String? diaryDate,
|
|
List<int> recommendedChartValues,
|
|
List<int> consumedChartValues,
|
|
List<Portion> portions,
|
|
List<SelectionPopupModel> mealList,
|
|
List<SelectionPopupModel> portionList,
|
|
List<Product> autocompleteList,
|
|
Map<String, dynamic> chartData,
|
|
Meal currentMeal,
|
|
SelectionPopupModel portionController,
|
|
TimeOfDay wakeupController,
|
|
TimeOfDay retireController,
|
|
TimeOfDay? mealTimeController,
|
|
TextEditingController commentController,
|
|
TextEditingController product_nameController,
|
|
TextEditingController productQuantityController,
|
|
TextEditingController caloriesController,
|
|
TextEditingController fatsController,
|
|
TextEditingController proteinsController,
|
|
TextEditingController carbsController,
|
|
int selectedMood,
|
|
int selectedSatiety,
|
|
bool wakeupExpanded,
|
|
bool moderationExpanded,
|
|
bool moodExpanded,
|
|
bool isLoading,
|
|
bool isAdded,
|
|
List<NutritionData>? chartDataCounted)
|
|
loaded,
|
|
required TResult Function(String errorMessage) error,
|
|
}) {
|
|
return loading(id);
|
|
}
|
|
|
|
@override
|
|
@optionalTypeArgs
|
|
TResult? whenOrNull<TResult extends Object?>(
|
|
TResult? Function()? $default, {
|
|
TResult? Function(int? id)? loading,
|
|
TResult? Function(
|
|
DiaryModel diary,
|
|
String? diaryDate,
|
|
List<int> recommendedChartValues,
|
|
List<int> consumedChartValues,
|
|
List<Portion> portions,
|
|
List<SelectionPopupModel> mealList,
|
|
List<SelectionPopupModel> portionList,
|
|
List<Product> autocompleteList,
|
|
Map<String, dynamic> chartData,
|
|
Meal currentMeal,
|
|
SelectionPopupModel portionController,
|
|
TimeOfDay wakeupController,
|
|
TimeOfDay retireController,
|
|
TimeOfDay? mealTimeController,
|
|
TextEditingController commentController,
|
|
TextEditingController product_nameController,
|
|
TextEditingController productQuantityController,
|
|
TextEditingController caloriesController,
|
|
TextEditingController fatsController,
|
|
TextEditingController proteinsController,
|
|
TextEditingController carbsController,
|
|
int selectedMood,
|
|
int selectedSatiety,
|
|
bool wakeupExpanded,
|
|
bool moderationExpanded,
|
|
bool moodExpanded,
|
|
bool isLoading,
|
|
bool isAdded,
|
|
List<NutritionData>? chartDataCounted)?
|
|
loaded,
|
|
TResult? Function(String errorMessage)? error,
|
|
}) {
|
|
return loading?.call(id);
|
|
}
|
|
|
|
@override
|
|
@optionalTypeArgs
|
|
TResult maybeWhen<TResult extends Object?>(
|
|
TResult Function()? $default, {
|
|
TResult Function(int? id)? loading,
|
|
TResult Function(
|
|
DiaryModel diary,
|
|
String? diaryDate,
|
|
List<int> recommendedChartValues,
|
|
List<int> consumedChartValues,
|
|
List<Portion> portions,
|
|
List<SelectionPopupModel> mealList,
|
|
List<SelectionPopupModel> portionList,
|
|
List<Product> autocompleteList,
|
|
Map<String, dynamic> chartData,
|
|
Meal currentMeal,
|
|
SelectionPopupModel portionController,
|
|
TimeOfDay wakeupController,
|
|
TimeOfDay retireController,
|
|
TimeOfDay? mealTimeController,
|
|
TextEditingController commentController,
|
|
TextEditingController product_nameController,
|
|
TextEditingController productQuantityController,
|
|
TextEditingController caloriesController,
|
|
TextEditingController fatsController,
|
|
TextEditingController proteinsController,
|
|
TextEditingController carbsController,
|
|
int selectedMood,
|
|
int selectedSatiety,
|
|
bool wakeupExpanded,
|
|
bool moderationExpanded,
|
|
bool moodExpanded,
|
|
bool isLoading,
|
|
bool isAdded,
|
|
List<NutritionData>? chartDataCounted)?
|
|
loaded,
|
|
TResult Function(String errorMessage)? error,
|
|
required TResult orElse(),
|
|
}) {
|
|
if (loading != null) {
|
|
return loading(id);
|
|
}
|
|
return orElse();
|
|
}
|
|
|
|
@override
|
|
@optionalTypeArgs
|
|
TResult map<TResult extends Object?>(
|
|
TResult Function(_DiaryState value) $default, {
|
|
required TResult Function(DiaryStateLoading value) loading,
|
|
required TResult Function(DiaryStateLoaded value) loaded,
|
|
required TResult Function(DiaryStateError value) error,
|
|
}) {
|
|
return loading(this);
|
|
}
|
|
|
|
@override
|
|
@optionalTypeArgs
|
|
TResult? mapOrNull<TResult extends Object?>(
|
|
TResult? Function(_DiaryState value)? $default, {
|
|
TResult? Function(DiaryStateLoading value)? loading,
|
|
TResult? Function(DiaryStateLoaded value)? loaded,
|
|
TResult? Function(DiaryStateError value)? error,
|
|
}) {
|
|
return loading?.call(this);
|
|
}
|
|
|
|
@override
|
|
@optionalTypeArgs
|
|
TResult maybeMap<TResult extends Object?>(
|
|
TResult Function(_DiaryState value)? $default, {
|
|
TResult Function(DiaryStateLoading value)? loading,
|
|
TResult Function(DiaryStateLoaded value)? loaded,
|
|
TResult Function(DiaryStateError value)? error,
|
|
required TResult orElse(),
|
|
}) {
|
|
if (loading != null) {
|
|
return loading(this);
|
|
}
|
|
return orElse();
|
|
}
|
|
}
|
|
|
|
abstract class DiaryStateLoading implements DiaryState {
|
|
const factory DiaryStateLoading({final int? id}) = _$DiaryStateLoadingImpl;
|
|
|
|
int? get id;
|
|
|
|
/// Create a copy of DiaryState
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
_$$DiaryStateLoadingImplCopyWith<_$DiaryStateLoadingImpl> get copyWith =>
|
|
throw _privateConstructorUsedError;
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract class _$$DiaryStateLoadedImplCopyWith<$Res> {
|
|
factory _$$DiaryStateLoadedImplCopyWith(_$DiaryStateLoadedImpl value,
|
|
$Res Function(_$DiaryStateLoadedImpl) then) =
|
|
__$$DiaryStateLoadedImplCopyWithImpl<$Res>;
|
|
@useResult
|
|
$Res call(
|
|
{DiaryModel diary,
|
|
String? diaryDate,
|
|
List<int> recommendedChartValues,
|
|
List<int> consumedChartValues,
|
|
List<Portion> portions,
|
|
List<SelectionPopupModel> mealList,
|
|
List<SelectionPopupModel> portionList,
|
|
List<Product> autocompleteList,
|
|
Map<String, dynamic> chartData,
|
|
Meal currentMeal,
|
|
SelectionPopupModel portionController,
|
|
TimeOfDay wakeupController,
|
|
TimeOfDay retireController,
|
|
TimeOfDay? mealTimeController,
|
|
TextEditingController commentController,
|
|
TextEditingController product_nameController,
|
|
TextEditingController productQuantityController,
|
|
TextEditingController caloriesController,
|
|
TextEditingController fatsController,
|
|
TextEditingController proteinsController,
|
|
TextEditingController carbsController,
|
|
int selectedMood,
|
|
int selectedSatiety,
|
|
bool wakeupExpanded,
|
|
bool moderationExpanded,
|
|
bool moodExpanded,
|
|
bool isLoading,
|
|
bool isAdded,
|
|
List<NutritionData>? chartDataCounted});
|
|
|
|
$DiaryModelCopyWith<$Res> get diary;
|
|
$MealCopyWith<$Res> get currentMeal;
|
|
$SelectionPopupModelCopyWith<$Res> get portionController;
|
|
}
|
|
|
|
/// @nodoc
|
|
class __$$DiaryStateLoadedImplCopyWithImpl<$Res>
|
|
extends _$DiaryStateCopyWithImpl<$Res, _$DiaryStateLoadedImpl>
|
|
implements _$$DiaryStateLoadedImplCopyWith<$Res> {
|
|
__$$DiaryStateLoadedImplCopyWithImpl(_$DiaryStateLoadedImpl _value,
|
|
$Res Function(_$DiaryStateLoadedImpl) _then)
|
|
: super(_value, _then);
|
|
|
|
/// Create a copy of DiaryState
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@pragma('vm:prefer-inline')
|
|
@override
|
|
$Res call({
|
|
Object? diary = null,
|
|
Object? diaryDate = freezed,
|
|
Object? recommendedChartValues = null,
|
|
Object? consumedChartValues = null,
|
|
Object? portions = null,
|
|
Object? mealList = null,
|
|
Object? portionList = null,
|
|
Object? autocompleteList = null,
|
|
Object? chartData = null,
|
|
Object? currentMeal = null,
|
|
Object? portionController = null,
|
|
Object? wakeupController = null,
|
|
Object? retireController = null,
|
|
Object? mealTimeController = freezed,
|
|
Object? commentController = null,
|
|
Object? product_nameController = null,
|
|
Object? productQuantityController = null,
|
|
Object? caloriesController = null,
|
|
Object? fatsController = null,
|
|
Object? proteinsController = null,
|
|
Object? carbsController = null,
|
|
Object? selectedMood = null,
|
|
Object? selectedSatiety = null,
|
|
Object? wakeupExpanded = null,
|
|
Object? moderationExpanded = null,
|
|
Object? moodExpanded = null,
|
|
Object? isLoading = null,
|
|
Object? isAdded = null,
|
|
Object? chartDataCounted = freezed,
|
|
}) {
|
|
return _then(_$DiaryStateLoadedImpl(
|
|
diary: null == diary
|
|
? _value.diary
|
|
: diary // ignore: cast_nullable_to_non_nullable
|
|
as DiaryModel,
|
|
diaryDate: freezed == diaryDate
|
|
? _value.diaryDate
|
|
: diaryDate // ignore: cast_nullable_to_non_nullable
|
|
as String?,
|
|
recommendedChartValues: null == recommendedChartValues
|
|
? _value._recommendedChartValues
|
|
: recommendedChartValues // ignore: cast_nullable_to_non_nullable
|
|
as List<int>,
|
|
consumedChartValues: null == consumedChartValues
|
|
? _value._consumedChartValues
|
|
: consumedChartValues // ignore: cast_nullable_to_non_nullable
|
|
as List<int>,
|
|
portions: null == portions
|
|
? _value._portions
|
|
: portions // ignore: cast_nullable_to_non_nullable
|
|
as List<Portion>,
|
|
mealList: null == mealList
|
|
? _value._mealList
|
|
: mealList // ignore: cast_nullable_to_non_nullable
|
|
as List<SelectionPopupModel>,
|
|
portionList: null == portionList
|
|
? _value._portionList
|
|
: portionList // ignore: cast_nullable_to_non_nullable
|
|
as List<SelectionPopupModel>,
|
|
autocompleteList: null == autocompleteList
|
|
? _value._autocompleteList
|
|
: autocompleteList // ignore: cast_nullable_to_non_nullable
|
|
as List<Product>,
|
|
chartData: null == chartData
|
|
? _value._chartData
|
|
: chartData // ignore: cast_nullable_to_non_nullable
|
|
as Map<String, dynamic>,
|
|
currentMeal: null == currentMeal
|
|
? _value.currentMeal
|
|
: currentMeal // ignore: cast_nullable_to_non_nullable
|
|
as Meal,
|
|
portionController: null == portionController
|
|
? _value.portionController
|
|
: portionController // ignore: cast_nullable_to_non_nullable
|
|
as SelectionPopupModel,
|
|
wakeupController: null == wakeupController
|
|
? _value.wakeupController
|
|
: wakeupController // ignore: cast_nullable_to_non_nullable
|
|
as TimeOfDay,
|
|
retireController: null == retireController
|
|
? _value.retireController
|
|
: retireController // ignore: cast_nullable_to_non_nullable
|
|
as TimeOfDay,
|
|
mealTimeController: freezed == mealTimeController
|
|
? _value.mealTimeController
|
|
: mealTimeController // ignore: cast_nullable_to_non_nullable
|
|
as TimeOfDay?,
|
|
commentController: null == commentController
|
|
? _value.commentController
|
|
: commentController // ignore: cast_nullable_to_non_nullable
|
|
as TextEditingController,
|
|
product_nameController: null == product_nameController
|
|
? _value.product_nameController
|
|
: product_nameController // ignore: cast_nullable_to_non_nullable
|
|
as TextEditingController,
|
|
productQuantityController: null == productQuantityController
|
|
? _value.productQuantityController
|
|
: productQuantityController // ignore: cast_nullable_to_non_nullable
|
|
as TextEditingController,
|
|
caloriesController: null == caloriesController
|
|
? _value.caloriesController
|
|
: caloriesController // ignore: cast_nullable_to_non_nullable
|
|
as TextEditingController,
|
|
fatsController: null == fatsController
|
|
? _value.fatsController
|
|
: fatsController // ignore: cast_nullable_to_non_nullable
|
|
as TextEditingController,
|
|
proteinsController: null == proteinsController
|
|
? _value.proteinsController
|
|
: proteinsController // ignore: cast_nullable_to_non_nullable
|
|
as TextEditingController,
|
|
carbsController: null == carbsController
|
|
? _value.carbsController
|
|
: carbsController // ignore: cast_nullable_to_non_nullable
|
|
as TextEditingController,
|
|
selectedMood: null == selectedMood
|
|
? _value.selectedMood
|
|
: selectedMood // ignore: cast_nullable_to_non_nullable
|
|
as int,
|
|
selectedSatiety: null == selectedSatiety
|
|
? _value.selectedSatiety
|
|
: selectedSatiety // ignore: cast_nullable_to_non_nullable
|
|
as int,
|
|
wakeupExpanded: null == wakeupExpanded
|
|
? _value.wakeupExpanded
|
|
: wakeupExpanded // ignore: cast_nullable_to_non_nullable
|
|
as bool,
|
|
moderationExpanded: null == moderationExpanded
|
|
? _value.moderationExpanded
|
|
: moderationExpanded // ignore: cast_nullable_to_non_nullable
|
|
as bool,
|
|
moodExpanded: null == moodExpanded
|
|
? _value.moodExpanded
|
|
: moodExpanded // ignore: cast_nullable_to_non_nullable
|
|
as bool,
|
|
isLoading: null == isLoading
|
|
? _value.isLoading
|
|
: isLoading // ignore: cast_nullable_to_non_nullable
|
|
as bool,
|
|
isAdded: null == isAdded
|
|
? _value.isAdded
|
|
: isAdded // ignore: cast_nullable_to_non_nullable
|
|
as bool,
|
|
chartDataCounted: freezed == chartDataCounted
|
|
? _value._chartDataCounted
|
|
: chartDataCounted // ignore: cast_nullable_to_non_nullable
|
|
as List<NutritionData>?,
|
|
));
|
|
}
|
|
|
|
/// Create a copy of DiaryState
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override
|
|
@pragma('vm:prefer-inline')
|
|
$DiaryModelCopyWith<$Res> get diary {
|
|
return $DiaryModelCopyWith<$Res>(_value.diary, (value) {
|
|
return _then(_value.copyWith(diary: value));
|
|
});
|
|
}
|
|
|
|
/// Create a copy of DiaryState
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override
|
|
@pragma('vm:prefer-inline')
|
|
$MealCopyWith<$Res> get currentMeal {
|
|
return $MealCopyWith<$Res>(_value.currentMeal, (value) {
|
|
return _then(_value.copyWith(currentMeal: value));
|
|
});
|
|
}
|
|
|
|
/// Create a copy of DiaryState
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override
|
|
@pragma('vm:prefer-inline')
|
|
$SelectionPopupModelCopyWith<$Res> get portionController {
|
|
return $SelectionPopupModelCopyWith<$Res>(_value.portionController,
|
|
(value) {
|
|
return _then(_value.copyWith(portionController: value));
|
|
});
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
|
|
class _$DiaryStateLoadedImpl implements DiaryStateLoaded {
|
|
const _$DiaryStateLoadedImpl(
|
|
{required this.diary,
|
|
this.diaryDate,
|
|
required final List<int> recommendedChartValues,
|
|
required final List<int> consumedChartValues,
|
|
required final List<Portion> portions,
|
|
required final List<SelectionPopupModel> mealList,
|
|
required final List<SelectionPopupModel> portionList,
|
|
required final List<Product> autocompleteList,
|
|
required final Map<String, dynamic> chartData,
|
|
required this.currentMeal,
|
|
required this.portionController,
|
|
required this.wakeupController,
|
|
required this.retireController,
|
|
this.mealTimeController,
|
|
required this.commentController,
|
|
required this.product_nameController,
|
|
required this.productQuantityController,
|
|
required this.caloriesController,
|
|
required this.fatsController,
|
|
required this.proteinsController,
|
|
required this.carbsController,
|
|
required this.selectedMood,
|
|
required this.selectedSatiety,
|
|
required this.wakeupExpanded,
|
|
required this.moderationExpanded,
|
|
required this.moodExpanded,
|
|
required this.isLoading,
|
|
required this.isAdded,
|
|
final List<NutritionData>? chartDataCounted})
|
|
: _recommendedChartValues = recommendedChartValues,
|
|
_consumedChartValues = consumedChartValues,
|
|
_portions = portions,
|
|
_mealList = mealList,
|
|
_portionList = portionList,
|
|
_autocompleteList = autocompleteList,
|
|
_chartData = chartData,
|
|
_chartDataCounted = chartDataCounted;
|
|
|
|
@override
|
|
final DiaryModel diary;
|
|
@override
|
|
final String? diaryDate;
|
|
final List<int> _recommendedChartValues;
|
|
@override
|
|
List<int> get recommendedChartValues {
|
|
if (_recommendedChartValues is EqualUnmodifiableListView)
|
|
return _recommendedChartValues;
|
|
// ignore: implicit_dynamic_type
|
|
return EqualUnmodifiableListView(_recommendedChartValues);
|
|
}
|
|
|
|
final List<int> _consumedChartValues;
|
|
@override
|
|
List<int> get consumedChartValues {
|
|
if (_consumedChartValues is EqualUnmodifiableListView)
|
|
return _consumedChartValues;
|
|
// ignore: implicit_dynamic_type
|
|
return EqualUnmodifiableListView(_consumedChartValues);
|
|
}
|
|
|
|
final List<Portion> _portions;
|
|
@override
|
|
List<Portion> get portions {
|
|
if (_portions is EqualUnmodifiableListView) return _portions;
|
|
// ignore: implicit_dynamic_type
|
|
return EqualUnmodifiableListView(_portions);
|
|
}
|
|
|
|
final List<SelectionPopupModel> _mealList;
|
|
@override
|
|
List<SelectionPopupModel> get mealList {
|
|
if (_mealList is EqualUnmodifiableListView) return _mealList;
|
|
// ignore: implicit_dynamic_type
|
|
return EqualUnmodifiableListView(_mealList);
|
|
}
|
|
|
|
final List<SelectionPopupModel> _portionList;
|
|
@override
|
|
List<SelectionPopupModel> get portionList {
|
|
if (_portionList is EqualUnmodifiableListView) return _portionList;
|
|
// ignore: implicit_dynamic_type
|
|
return EqualUnmodifiableListView(_portionList);
|
|
}
|
|
|
|
final List<Product> _autocompleteList;
|
|
@override
|
|
List<Product> get autocompleteList {
|
|
if (_autocompleteList is EqualUnmodifiableListView)
|
|
return _autocompleteList;
|
|
// ignore: implicit_dynamic_type
|
|
return EqualUnmodifiableListView(_autocompleteList);
|
|
}
|
|
|
|
final Map<String, dynamic> _chartData;
|
|
@override
|
|
Map<String, dynamic> get chartData {
|
|
if (_chartData is EqualUnmodifiableMapView) return _chartData;
|
|
// ignore: implicit_dynamic_type
|
|
return EqualUnmodifiableMapView(_chartData);
|
|
}
|
|
|
|
@override
|
|
final Meal currentMeal;
|
|
@override
|
|
final SelectionPopupModel portionController;
|
|
@override
|
|
final TimeOfDay wakeupController;
|
|
@override
|
|
final TimeOfDay retireController;
|
|
@override
|
|
final TimeOfDay? mealTimeController;
|
|
@override
|
|
final TextEditingController commentController;
|
|
@override
|
|
final TextEditingController product_nameController;
|
|
@override
|
|
final TextEditingController productQuantityController;
|
|
@override
|
|
final TextEditingController caloriesController;
|
|
@override
|
|
final TextEditingController fatsController;
|
|
@override
|
|
final TextEditingController proteinsController;
|
|
@override
|
|
final TextEditingController carbsController;
|
|
@override
|
|
final int selectedMood;
|
|
@override
|
|
final int selectedSatiety;
|
|
@override
|
|
final bool wakeupExpanded;
|
|
@override
|
|
final bool moderationExpanded;
|
|
@override
|
|
final bool moodExpanded;
|
|
@override
|
|
final bool isLoading;
|
|
@override
|
|
final bool isAdded;
|
|
final List<NutritionData>? _chartDataCounted;
|
|
@override
|
|
List<NutritionData>? get chartDataCounted {
|
|
final value = _chartDataCounted;
|
|
if (value == null) return null;
|
|
if (_chartDataCounted is EqualUnmodifiableListView)
|
|
return _chartDataCounted;
|
|
// ignore: implicit_dynamic_type
|
|
return EqualUnmodifiableListView(value);
|
|
}
|
|
|
|
@override
|
|
String toString() {
|
|
return 'DiaryState.loaded(diary: $diary, diaryDate: $diaryDate, recommendedChartValues: $recommendedChartValues, consumedChartValues: $consumedChartValues, portions: $portions, mealList: $mealList, portionList: $portionList, autocompleteList: $autocompleteList, chartData: $chartData, currentMeal: $currentMeal, portionController: $portionController, wakeupController: $wakeupController, retireController: $retireController, mealTimeController: $mealTimeController, commentController: $commentController, product_nameController: $product_nameController, productQuantityController: $productQuantityController, caloriesController: $caloriesController, fatsController: $fatsController, proteinsController: $proteinsController, carbsController: $carbsController, selectedMood: $selectedMood, selectedSatiety: $selectedSatiety, wakeupExpanded: $wakeupExpanded, moderationExpanded: $moderationExpanded, moodExpanded: $moodExpanded, isLoading: $isLoading, isAdded: $isAdded, chartDataCounted: $chartDataCounted)';
|
|
}
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
return identical(this, other) ||
|
|
(other.runtimeType == runtimeType &&
|
|
other is _$DiaryStateLoadedImpl &&
|
|
(identical(other.diary, diary) || other.diary == diary) &&
|
|
(identical(other.diaryDate, diaryDate) ||
|
|
other.diaryDate == diaryDate) &&
|
|
const DeepCollectionEquality().equals(
|
|
other._recommendedChartValues, _recommendedChartValues) &&
|
|
const DeepCollectionEquality()
|
|
.equals(other._consumedChartValues, _consumedChartValues) &&
|
|
const DeepCollectionEquality().equals(other._portions, _portions) &&
|
|
const DeepCollectionEquality().equals(other._mealList, _mealList) &&
|
|
const DeepCollectionEquality()
|
|
.equals(other._portionList, _portionList) &&
|
|
const DeepCollectionEquality()
|
|
.equals(other._autocompleteList, _autocompleteList) &&
|
|
const DeepCollectionEquality()
|
|
.equals(other._chartData, _chartData) &&
|
|
(identical(other.currentMeal, currentMeal) ||
|
|
other.currentMeal == currentMeal) &&
|
|
(identical(other.portionController, portionController) ||
|
|
other.portionController == portionController) &&
|
|
(identical(other.wakeupController, wakeupController) ||
|
|
other.wakeupController == wakeupController) &&
|
|
(identical(other.retireController, retireController) ||
|
|
other.retireController == retireController) &&
|
|
(identical(other.mealTimeController, mealTimeController) ||
|
|
other.mealTimeController == mealTimeController) &&
|
|
(identical(other.commentController, commentController) ||
|
|
other.commentController == commentController) &&
|
|
(identical(other.product_nameController, product_nameController) ||
|
|
other.product_nameController == product_nameController) &&
|
|
(identical(other.productQuantityController,
|
|
productQuantityController) ||
|
|
other.productQuantityController == productQuantityController) &&
|
|
(identical(other.caloriesController, caloriesController) ||
|
|
other.caloriesController == caloriesController) &&
|
|
(identical(other.fatsController, fatsController) ||
|
|
other.fatsController == fatsController) &&
|
|
(identical(other.proteinsController, proteinsController) ||
|
|
other.proteinsController == proteinsController) &&
|
|
(identical(other.carbsController, carbsController) ||
|
|
other.carbsController == carbsController) &&
|
|
(identical(other.selectedMood, selectedMood) ||
|
|
other.selectedMood == selectedMood) &&
|
|
(identical(other.selectedSatiety, selectedSatiety) ||
|
|
other.selectedSatiety == selectedSatiety) &&
|
|
(identical(other.wakeupExpanded, wakeupExpanded) ||
|
|
other.wakeupExpanded == wakeupExpanded) &&
|
|
(identical(other.moderationExpanded, moderationExpanded) ||
|
|
other.moderationExpanded == moderationExpanded) &&
|
|
(identical(other.moodExpanded, moodExpanded) ||
|
|
other.moodExpanded == moodExpanded) &&
|
|
(identical(other.isLoading, isLoading) ||
|
|
other.isLoading == isLoading) &&
|
|
(identical(other.isAdded, isAdded) || other.isAdded == isAdded) &&
|
|
const DeepCollectionEquality()
|
|
.equals(other._chartDataCounted, _chartDataCounted));
|
|
}
|
|
|
|
@override
|
|
int get hashCode => Object.hashAll([
|
|
runtimeType,
|
|
diary,
|
|
diaryDate,
|
|
const DeepCollectionEquality().hash(_recommendedChartValues),
|
|
const DeepCollectionEquality().hash(_consumedChartValues),
|
|
const DeepCollectionEquality().hash(_portions),
|
|
const DeepCollectionEquality().hash(_mealList),
|
|
const DeepCollectionEquality().hash(_portionList),
|
|
const DeepCollectionEquality().hash(_autocompleteList),
|
|
const DeepCollectionEquality().hash(_chartData),
|
|
currentMeal,
|
|
portionController,
|
|
wakeupController,
|
|
retireController,
|
|
mealTimeController,
|
|
commentController,
|
|
product_nameController,
|
|
productQuantityController,
|
|
caloriesController,
|
|
fatsController,
|
|
proteinsController,
|
|
carbsController,
|
|
selectedMood,
|
|
selectedSatiety,
|
|
wakeupExpanded,
|
|
moderationExpanded,
|
|
moodExpanded,
|
|
isLoading,
|
|
isAdded,
|
|
const DeepCollectionEquality().hash(_chartDataCounted)
|
|
]);
|
|
|
|
/// Create a copy of DiaryState
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@override
|
|
@pragma('vm:prefer-inline')
|
|
_$$DiaryStateLoadedImplCopyWith<_$DiaryStateLoadedImpl> get copyWith =>
|
|
__$$DiaryStateLoadedImplCopyWithImpl<_$DiaryStateLoadedImpl>(
|
|
this, _$identity);
|
|
|
|
@override
|
|
@optionalTypeArgs
|
|
TResult when<TResult extends Object?>(
|
|
TResult Function() $default, {
|
|
required TResult Function(int? id) loading,
|
|
required TResult Function(
|
|
DiaryModel diary,
|
|
String? diaryDate,
|
|
List<int> recommendedChartValues,
|
|
List<int> consumedChartValues,
|
|
List<Portion> portions,
|
|
List<SelectionPopupModel> mealList,
|
|
List<SelectionPopupModel> portionList,
|
|
List<Product> autocompleteList,
|
|
Map<String, dynamic> chartData,
|
|
Meal currentMeal,
|
|
SelectionPopupModel portionController,
|
|
TimeOfDay wakeupController,
|
|
TimeOfDay retireController,
|
|
TimeOfDay? mealTimeController,
|
|
TextEditingController commentController,
|
|
TextEditingController product_nameController,
|
|
TextEditingController productQuantityController,
|
|
TextEditingController caloriesController,
|
|
TextEditingController fatsController,
|
|
TextEditingController proteinsController,
|
|
TextEditingController carbsController,
|
|
int selectedMood,
|
|
int selectedSatiety,
|
|
bool wakeupExpanded,
|
|
bool moderationExpanded,
|
|
bool moodExpanded,
|
|
bool isLoading,
|
|
bool isAdded,
|
|
List<NutritionData>? chartDataCounted)
|
|
loaded,
|
|
required TResult Function(String errorMessage) error,
|
|
}) {
|
|
return loaded(
|
|
diary,
|
|
diaryDate,
|
|
recommendedChartValues,
|
|
consumedChartValues,
|
|
portions,
|
|
mealList,
|
|
portionList,
|
|
autocompleteList,
|
|
chartData,
|
|
currentMeal,
|
|
portionController,
|
|
wakeupController,
|
|
retireController,
|
|
mealTimeController,
|
|
commentController,
|
|
product_nameController,
|
|
productQuantityController,
|
|
caloriesController,
|
|
fatsController,
|
|
proteinsController,
|
|
carbsController,
|
|
selectedMood,
|
|
selectedSatiety,
|
|
wakeupExpanded,
|
|
moderationExpanded,
|
|
moodExpanded,
|
|
isLoading,
|
|
isAdded,
|
|
chartDataCounted);
|
|
}
|
|
|
|
@override
|
|
@optionalTypeArgs
|
|
TResult? whenOrNull<TResult extends Object?>(
|
|
TResult? Function()? $default, {
|
|
TResult? Function(int? id)? loading,
|
|
TResult? Function(
|
|
DiaryModel diary,
|
|
String? diaryDate,
|
|
List<int> recommendedChartValues,
|
|
List<int> consumedChartValues,
|
|
List<Portion> portions,
|
|
List<SelectionPopupModel> mealList,
|
|
List<SelectionPopupModel> portionList,
|
|
List<Product> autocompleteList,
|
|
Map<String, dynamic> chartData,
|
|
Meal currentMeal,
|
|
SelectionPopupModel portionController,
|
|
TimeOfDay wakeupController,
|
|
TimeOfDay retireController,
|
|
TimeOfDay? mealTimeController,
|
|
TextEditingController commentController,
|
|
TextEditingController product_nameController,
|
|
TextEditingController productQuantityController,
|
|
TextEditingController caloriesController,
|
|
TextEditingController fatsController,
|
|
TextEditingController proteinsController,
|
|
TextEditingController carbsController,
|
|
int selectedMood,
|
|
int selectedSatiety,
|
|
bool wakeupExpanded,
|
|
bool moderationExpanded,
|
|
bool moodExpanded,
|
|
bool isLoading,
|
|
bool isAdded,
|
|
List<NutritionData>? chartDataCounted)?
|
|
loaded,
|
|
TResult? Function(String errorMessage)? error,
|
|
}) {
|
|
return loaded?.call(
|
|
diary,
|
|
diaryDate,
|
|
recommendedChartValues,
|
|
consumedChartValues,
|
|
portions,
|
|
mealList,
|
|
portionList,
|
|
autocompleteList,
|
|
chartData,
|
|
currentMeal,
|
|
portionController,
|
|
wakeupController,
|
|
retireController,
|
|
mealTimeController,
|
|
commentController,
|
|
product_nameController,
|
|
productQuantityController,
|
|
caloriesController,
|
|
fatsController,
|
|
proteinsController,
|
|
carbsController,
|
|
selectedMood,
|
|
selectedSatiety,
|
|
wakeupExpanded,
|
|
moderationExpanded,
|
|
moodExpanded,
|
|
isLoading,
|
|
isAdded,
|
|
chartDataCounted);
|
|
}
|
|
|
|
@override
|
|
@optionalTypeArgs
|
|
TResult maybeWhen<TResult extends Object?>(
|
|
TResult Function()? $default, {
|
|
TResult Function(int? id)? loading,
|
|
TResult Function(
|
|
DiaryModel diary,
|
|
String? diaryDate,
|
|
List<int> recommendedChartValues,
|
|
List<int> consumedChartValues,
|
|
List<Portion> portions,
|
|
List<SelectionPopupModel> mealList,
|
|
List<SelectionPopupModel> portionList,
|
|
List<Product> autocompleteList,
|
|
Map<String, dynamic> chartData,
|
|
Meal currentMeal,
|
|
SelectionPopupModel portionController,
|
|
TimeOfDay wakeupController,
|
|
TimeOfDay retireController,
|
|
TimeOfDay? mealTimeController,
|
|
TextEditingController commentController,
|
|
TextEditingController product_nameController,
|
|
TextEditingController productQuantityController,
|
|
TextEditingController caloriesController,
|
|
TextEditingController fatsController,
|
|
TextEditingController proteinsController,
|
|
TextEditingController carbsController,
|
|
int selectedMood,
|
|
int selectedSatiety,
|
|
bool wakeupExpanded,
|
|
bool moderationExpanded,
|
|
bool moodExpanded,
|
|
bool isLoading,
|
|
bool isAdded,
|
|
List<NutritionData>? chartDataCounted)?
|
|
loaded,
|
|
TResult Function(String errorMessage)? error,
|
|
required TResult orElse(),
|
|
}) {
|
|
if (loaded != null) {
|
|
return loaded(
|
|
diary,
|
|
diaryDate,
|
|
recommendedChartValues,
|
|
consumedChartValues,
|
|
portions,
|
|
mealList,
|
|
portionList,
|
|
autocompleteList,
|
|
chartData,
|
|
currentMeal,
|
|
portionController,
|
|
wakeupController,
|
|
retireController,
|
|
mealTimeController,
|
|
commentController,
|
|
product_nameController,
|
|
productQuantityController,
|
|
caloriesController,
|
|
fatsController,
|
|
proteinsController,
|
|
carbsController,
|
|
selectedMood,
|
|
selectedSatiety,
|
|
wakeupExpanded,
|
|
moderationExpanded,
|
|
moodExpanded,
|
|
isLoading,
|
|
isAdded,
|
|
chartDataCounted);
|
|
}
|
|
return orElse();
|
|
}
|
|
|
|
@override
|
|
@optionalTypeArgs
|
|
TResult map<TResult extends Object?>(
|
|
TResult Function(_DiaryState value) $default, {
|
|
required TResult Function(DiaryStateLoading value) loading,
|
|
required TResult Function(DiaryStateLoaded value) loaded,
|
|
required TResult Function(DiaryStateError value) error,
|
|
}) {
|
|
return loaded(this);
|
|
}
|
|
|
|
@override
|
|
@optionalTypeArgs
|
|
TResult? mapOrNull<TResult extends Object?>(
|
|
TResult? Function(_DiaryState value)? $default, {
|
|
TResult? Function(DiaryStateLoading value)? loading,
|
|
TResult? Function(DiaryStateLoaded value)? loaded,
|
|
TResult? Function(DiaryStateError value)? error,
|
|
}) {
|
|
return loaded?.call(this);
|
|
}
|
|
|
|
@override
|
|
@optionalTypeArgs
|
|
TResult maybeMap<TResult extends Object?>(
|
|
TResult Function(_DiaryState value)? $default, {
|
|
TResult Function(DiaryStateLoading value)? loading,
|
|
TResult Function(DiaryStateLoaded value)? loaded,
|
|
TResult Function(DiaryStateError value)? error,
|
|
required TResult orElse(),
|
|
}) {
|
|
if (loaded != null) {
|
|
return loaded(this);
|
|
}
|
|
return orElse();
|
|
}
|
|
}
|
|
|
|
abstract class DiaryStateLoaded implements DiaryState {
|
|
const factory DiaryStateLoaded(
|
|
{required final DiaryModel diary,
|
|
final String? diaryDate,
|
|
required final List<int> recommendedChartValues,
|
|
required final List<int> consumedChartValues,
|
|
required final List<Portion> portions,
|
|
required final List<SelectionPopupModel> mealList,
|
|
required final List<SelectionPopupModel> portionList,
|
|
required final List<Product> autocompleteList,
|
|
required final Map<String, dynamic> chartData,
|
|
required final Meal currentMeal,
|
|
required final SelectionPopupModel portionController,
|
|
required final TimeOfDay wakeupController,
|
|
required final TimeOfDay retireController,
|
|
final TimeOfDay? mealTimeController,
|
|
required final TextEditingController commentController,
|
|
required final TextEditingController product_nameController,
|
|
required final TextEditingController productQuantityController,
|
|
required final TextEditingController caloriesController,
|
|
required final TextEditingController fatsController,
|
|
required final TextEditingController proteinsController,
|
|
required final TextEditingController carbsController,
|
|
required final int selectedMood,
|
|
required final int selectedSatiety,
|
|
required final bool wakeupExpanded,
|
|
required final bool moderationExpanded,
|
|
required final bool moodExpanded,
|
|
required final bool isLoading,
|
|
required final bool isAdded,
|
|
final List<NutritionData>? chartDataCounted}) = _$DiaryStateLoadedImpl;
|
|
|
|
DiaryModel get diary;
|
|
String? get diaryDate;
|
|
List<int> get recommendedChartValues;
|
|
List<int> get consumedChartValues;
|
|
List<Portion> get portions;
|
|
List<SelectionPopupModel> get mealList;
|
|
List<SelectionPopupModel> get portionList;
|
|
List<Product> get autocompleteList;
|
|
Map<String, dynamic> get chartData;
|
|
Meal get currentMeal;
|
|
SelectionPopupModel get portionController;
|
|
TimeOfDay get wakeupController;
|
|
TimeOfDay get retireController;
|
|
TimeOfDay? get mealTimeController;
|
|
TextEditingController get commentController;
|
|
TextEditingController get product_nameController;
|
|
TextEditingController get productQuantityController;
|
|
TextEditingController get caloriesController;
|
|
TextEditingController get fatsController;
|
|
TextEditingController get proteinsController;
|
|
TextEditingController get carbsController;
|
|
int get selectedMood;
|
|
int get selectedSatiety;
|
|
bool get wakeupExpanded;
|
|
bool get moderationExpanded;
|
|
bool get moodExpanded;
|
|
bool get isLoading;
|
|
bool get isAdded;
|
|
List<NutritionData>? get chartDataCounted;
|
|
|
|
/// Create a copy of DiaryState
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
_$$DiaryStateLoadedImplCopyWith<_$DiaryStateLoadedImpl> get copyWith =>
|
|
throw _privateConstructorUsedError;
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract class _$$DiaryStateErrorImplCopyWith<$Res> {
|
|
factory _$$DiaryStateErrorImplCopyWith(_$DiaryStateErrorImpl value,
|
|
$Res Function(_$DiaryStateErrorImpl) then) =
|
|
__$$DiaryStateErrorImplCopyWithImpl<$Res>;
|
|
@useResult
|
|
$Res call({String errorMessage});
|
|
}
|
|
|
|
/// @nodoc
|
|
class __$$DiaryStateErrorImplCopyWithImpl<$Res>
|
|
extends _$DiaryStateCopyWithImpl<$Res, _$DiaryStateErrorImpl>
|
|
implements _$$DiaryStateErrorImplCopyWith<$Res> {
|
|
__$$DiaryStateErrorImplCopyWithImpl(
|
|
_$DiaryStateErrorImpl _value, $Res Function(_$DiaryStateErrorImpl) _then)
|
|
: super(_value, _then);
|
|
|
|
/// Create a copy of DiaryState
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@pragma('vm:prefer-inline')
|
|
@override
|
|
$Res call({
|
|
Object? errorMessage = null,
|
|
}) {
|
|
return _then(_$DiaryStateErrorImpl(
|
|
errorMessage: null == errorMessage
|
|
? _value.errorMessage
|
|
: errorMessage // ignore: cast_nullable_to_non_nullable
|
|
as String,
|
|
));
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
|
|
class _$DiaryStateErrorImpl implements DiaryStateError {
|
|
const _$DiaryStateErrorImpl({required this.errorMessage});
|
|
|
|
@override
|
|
final String errorMessage;
|
|
|
|
@override
|
|
String toString() {
|
|
return 'DiaryState.error(errorMessage: $errorMessage)';
|
|
}
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
return identical(this, other) ||
|
|
(other.runtimeType == runtimeType &&
|
|
other is _$DiaryStateErrorImpl &&
|
|
(identical(other.errorMessage, errorMessage) ||
|
|
other.errorMessage == errorMessage));
|
|
}
|
|
|
|
@override
|
|
int get hashCode => Object.hash(runtimeType, errorMessage);
|
|
|
|
/// Create a copy of DiaryState
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@override
|
|
@pragma('vm:prefer-inline')
|
|
_$$DiaryStateErrorImplCopyWith<_$DiaryStateErrorImpl> get copyWith =>
|
|
__$$DiaryStateErrorImplCopyWithImpl<_$DiaryStateErrorImpl>(
|
|
this, _$identity);
|
|
|
|
@override
|
|
@optionalTypeArgs
|
|
TResult when<TResult extends Object?>(
|
|
TResult Function() $default, {
|
|
required TResult Function(int? id) loading,
|
|
required TResult Function(
|
|
DiaryModel diary,
|
|
String? diaryDate,
|
|
List<int> recommendedChartValues,
|
|
List<int> consumedChartValues,
|
|
List<Portion> portions,
|
|
List<SelectionPopupModel> mealList,
|
|
List<SelectionPopupModel> portionList,
|
|
List<Product> autocompleteList,
|
|
Map<String, dynamic> chartData,
|
|
Meal currentMeal,
|
|
SelectionPopupModel portionController,
|
|
TimeOfDay wakeupController,
|
|
TimeOfDay retireController,
|
|
TimeOfDay? mealTimeController,
|
|
TextEditingController commentController,
|
|
TextEditingController product_nameController,
|
|
TextEditingController productQuantityController,
|
|
TextEditingController caloriesController,
|
|
TextEditingController fatsController,
|
|
TextEditingController proteinsController,
|
|
TextEditingController carbsController,
|
|
int selectedMood,
|
|
int selectedSatiety,
|
|
bool wakeupExpanded,
|
|
bool moderationExpanded,
|
|
bool moodExpanded,
|
|
bool isLoading,
|
|
bool isAdded,
|
|
List<NutritionData>? chartDataCounted)
|
|
loaded,
|
|
required TResult Function(String errorMessage) error,
|
|
}) {
|
|
return error(errorMessage);
|
|
}
|
|
|
|
@override
|
|
@optionalTypeArgs
|
|
TResult? whenOrNull<TResult extends Object?>(
|
|
TResult? Function()? $default, {
|
|
TResult? Function(int? id)? loading,
|
|
TResult? Function(
|
|
DiaryModel diary,
|
|
String? diaryDate,
|
|
List<int> recommendedChartValues,
|
|
List<int> consumedChartValues,
|
|
List<Portion> portions,
|
|
List<SelectionPopupModel> mealList,
|
|
List<SelectionPopupModel> portionList,
|
|
List<Product> autocompleteList,
|
|
Map<String, dynamic> chartData,
|
|
Meal currentMeal,
|
|
SelectionPopupModel portionController,
|
|
TimeOfDay wakeupController,
|
|
TimeOfDay retireController,
|
|
TimeOfDay? mealTimeController,
|
|
TextEditingController commentController,
|
|
TextEditingController product_nameController,
|
|
TextEditingController productQuantityController,
|
|
TextEditingController caloriesController,
|
|
TextEditingController fatsController,
|
|
TextEditingController proteinsController,
|
|
TextEditingController carbsController,
|
|
int selectedMood,
|
|
int selectedSatiety,
|
|
bool wakeupExpanded,
|
|
bool moderationExpanded,
|
|
bool moodExpanded,
|
|
bool isLoading,
|
|
bool isAdded,
|
|
List<NutritionData>? chartDataCounted)?
|
|
loaded,
|
|
TResult? Function(String errorMessage)? error,
|
|
}) {
|
|
return error?.call(errorMessage);
|
|
}
|
|
|
|
@override
|
|
@optionalTypeArgs
|
|
TResult maybeWhen<TResult extends Object?>(
|
|
TResult Function()? $default, {
|
|
TResult Function(int? id)? loading,
|
|
TResult Function(
|
|
DiaryModel diary,
|
|
String? diaryDate,
|
|
List<int> recommendedChartValues,
|
|
List<int> consumedChartValues,
|
|
List<Portion> portions,
|
|
List<SelectionPopupModel> mealList,
|
|
List<SelectionPopupModel> portionList,
|
|
List<Product> autocompleteList,
|
|
Map<String, dynamic> chartData,
|
|
Meal currentMeal,
|
|
SelectionPopupModel portionController,
|
|
TimeOfDay wakeupController,
|
|
TimeOfDay retireController,
|
|
TimeOfDay? mealTimeController,
|
|
TextEditingController commentController,
|
|
TextEditingController product_nameController,
|
|
TextEditingController productQuantityController,
|
|
TextEditingController caloriesController,
|
|
TextEditingController fatsController,
|
|
TextEditingController proteinsController,
|
|
TextEditingController carbsController,
|
|
int selectedMood,
|
|
int selectedSatiety,
|
|
bool wakeupExpanded,
|
|
bool moderationExpanded,
|
|
bool moodExpanded,
|
|
bool isLoading,
|
|
bool isAdded,
|
|
List<NutritionData>? chartDataCounted)?
|
|
loaded,
|
|
TResult Function(String errorMessage)? error,
|
|
required TResult orElse(),
|
|
}) {
|
|
if (error != null) {
|
|
return error(errorMessage);
|
|
}
|
|
return orElse();
|
|
}
|
|
|
|
@override
|
|
@optionalTypeArgs
|
|
TResult map<TResult extends Object?>(
|
|
TResult Function(_DiaryState value) $default, {
|
|
required TResult Function(DiaryStateLoading value) loading,
|
|
required TResult Function(DiaryStateLoaded value) loaded,
|
|
required TResult Function(DiaryStateError value) error,
|
|
}) {
|
|
return error(this);
|
|
}
|
|
|
|
@override
|
|
@optionalTypeArgs
|
|
TResult? mapOrNull<TResult extends Object?>(
|
|
TResult? Function(_DiaryState value)? $default, {
|
|
TResult? Function(DiaryStateLoading value)? loading,
|
|
TResult? Function(DiaryStateLoaded value)? loaded,
|
|
TResult? Function(DiaryStateError value)? error,
|
|
}) {
|
|
return error?.call(this);
|
|
}
|
|
|
|
@override
|
|
@optionalTypeArgs
|
|
TResult maybeMap<TResult extends Object?>(
|
|
TResult Function(_DiaryState value)? $default, {
|
|
TResult Function(DiaryStateLoading value)? loading,
|
|
TResult Function(DiaryStateLoaded value)? loaded,
|
|
TResult Function(DiaryStateError value)? error,
|
|
required TResult orElse(),
|
|
}) {
|
|
if (error != null) {
|
|
return error(this);
|
|
}
|
|
return orElse();
|
|
}
|
|
}
|
|
|
|
abstract class DiaryStateError implements DiaryState {
|
|
const factory DiaryStateError({required final String errorMessage}) =
|
|
_$DiaryStateErrorImpl;
|
|
|
|
String get errorMessage;
|
|
|
|
/// Create a copy of DiaryState
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
_$$DiaryStateErrorImplCopyWith<_$DiaryStateErrorImpl> get copyWith =>
|
|
throw _privateConstructorUsedError;
|
|
}
|