forked from eatvio/eatvio_app
refactor(diary): Fix
This commit is contained in:
@@ -23,12 +23,12 @@ mixin _$DiaryState {
|
||||
required TResult Function(
|
||||
DiaryModel diary,
|
||||
String? diaryDate,
|
||||
List<dynamic>? autocompleteList,
|
||||
List<dynamic> autocompleteList,
|
||||
List<int> recommendedChartValues,
|
||||
List<int> consumedChartValues,
|
||||
List<Portion>? portions,
|
||||
List<Photo>? photos,
|
||||
Meal? currentMeal,
|
||||
List<Portion> portions,
|
||||
List<Photo> photos,
|
||||
Meal currentMeal,
|
||||
SelectionPopupModel? portionController,
|
||||
TimeOfDay? wakeupController,
|
||||
TimeOfDay? retireController,
|
||||
@@ -58,12 +58,12 @@ mixin _$DiaryState {
|
||||
TResult? Function(
|
||||
DiaryModel diary,
|
||||
String? diaryDate,
|
||||
List<dynamic>? autocompleteList,
|
||||
List<dynamic> autocompleteList,
|
||||
List<int> recommendedChartValues,
|
||||
List<int> consumedChartValues,
|
||||
List<Portion>? portions,
|
||||
List<Photo>? photos,
|
||||
Meal? currentMeal,
|
||||
List<Portion> portions,
|
||||
List<Photo> photos,
|
||||
Meal currentMeal,
|
||||
SelectionPopupModel? portionController,
|
||||
TimeOfDay? wakeupController,
|
||||
TimeOfDay? retireController,
|
||||
@@ -93,12 +93,12 @@ mixin _$DiaryState {
|
||||
TResult Function(
|
||||
DiaryModel diary,
|
||||
String? diaryDate,
|
||||
List<dynamic>? autocompleteList,
|
||||
List<dynamic> autocompleteList,
|
||||
List<int> recommendedChartValues,
|
||||
List<int> consumedChartValues,
|
||||
List<Portion>? portions,
|
||||
List<Photo>? photos,
|
||||
Meal? currentMeal,
|
||||
List<Portion> portions,
|
||||
List<Photo> photos,
|
||||
Meal currentMeal,
|
||||
SelectionPopupModel? portionController,
|
||||
TimeOfDay? wakeupController,
|
||||
TimeOfDay? retireController,
|
||||
@@ -210,12 +210,12 @@ class _$DiaryStateImpl implements _DiaryState {
|
||||
required TResult Function(
|
||||
DiaryModel diary,
|
||||
String? diaryDate,
|
||||
List<dynamic>? autocompleteList,
|
||||
List<dynamic> autocompleteList,
|
||||
List<int> recommendedChartValues,
|
||||
List<int> consumedChartValues,
|
||||
List<Portion>? portions,
|
||||
List<Photo>? photos,
|
||||
Meal? currentMeal,
|
||||
List<Portion> portions,
|
||||
List<Photo> photos,
|
||||
Meal currentMeal,
|
||||
SelectionPopupModel? portionController,
|
||||
TimeOfDay? wakeupController,
|
||||
TimeOfDay? retireController,
|
||||
@@ -248,12 +248,12 @@ class _$DiaryStateImpl implements _DiaryState {
|
||||
TResult? Function(
|
||||
DiaryModel diary,
|
||||
String? diaryDate,
|
||||
List<dynamic>? autocompleteList,
|
||||
List<dynamic> autocompleteList,
|
||||
List<int> recommendedChartValues,
|
||||
List<int> consumedChartValues,
|
||||
List<Portion>? portions,
|
||||
List<Photo>? photos,
|
||||
Meal? currentMeal,
|
||||
List<Portion> portions,
|
||||
List<Photo> photos,
|
||||
Meal currentMeal,
|
||||
SelectionPopupModel? portionController,
|
||||
TimeOfDay? wakeupController,
|
||||
TimeOfDay? retireController,
|
||||
@@ -286,12 +286,12 @@ class _$DiaryStateImpl implements _DiaryState {
|
||||
TResult Function(
|
||||
DiaryModel diary,
|
||||
String? diaryDate,
|
||||
List<dynamic>? autocompleteList,
|
||||
List<dynamic> autocompleteList,
|
||||
List<int> recommendedChartValues,
|
||||
List<int> consumedChartValues,
|
||||
List<Portion>? portions,
|
||||
List<Photo>? photos,
|
||||
Meal? currentMeal,
|
||||
List<Portion> portions,
|
||||
List<Photo> photos,
|
||||
Meal currentMeal,
|
||||
SelectionPopupModel? portionController,
|
||||
TimeOfDay? wakeupController,
|
||||
TimeOfDay? retireController,
|
||||
@@ -405,12 +405,12 @@ class _$DiaryStateLoadingImpl implements DiaryStateLoading {
|
||||
required TResult Function(
|
||||
DiaryModel diary,
|
||||
String? diaryDate,
|
||||
List<dynamic>? autocompleteList,
|
||||
List<dynamic> autocompleteList,
|
||||
List<int> recommendedChartValues,
|
||||
List<int> consumedChartValues,
|
||||
List<Portion>? portions,
|
||||
List<Photo>? photos,
|
||||
Meal? currentMeal,
|
||||
List<Portion> portions,
|
||||
List<Photo> photos,
|
||||
Meal currentMeal,
|
||||
SelectionPopupModel? portionController,
|
||||
TimeOfDay? wakeupController,
|
||||
TimeOfDay? retireController,
|
||||
@@ -443,12 +443,12 @@ class _$DiaryStateLoadingImpl implements DiaryStateLoading {
|
||||
TResult? Function(
|
||||
DiaryModel diary,
|
||||
String? diaryDate,
|
||||
List<dynamic>? autocompleteList,
|
||||
List<dynamic> autocompleteList,
|
||||
List<int> recommendedChartValues,
|
||||
List<int> consumedChartValues,
|
||||
List<Portion>? portions,
|
||||
List<Photo>? photos,
|
||||
Meal? currentMeal,
|
||||
List<Portion> portions,
|
||||
List<Photo> photos,
|
||||
Meal currentMeal,
|
||||
SelectionPopupModel? portionController,
|
||||
TimeOfDay? wakeupController,
|
||||
TimeOfDay? retireController,
|
||||
@@ -481,12 +481,12 @@ class _$DiaryStateLoadingImpl implements DiaryStateLoading {
|
||||
TResult Function(
|
||||
DiaryModel diary,
|
||||
String? diaryDate,
|
||||
List<dynamic>? autocompleteList,
|
||||
List<dynamic> autocompleteList,
|
||||
List<int> recommendedChartValues,
|
||||
List<int> consumedChartValues,
|
||||
List<Portion>? portions,
|
||||
List<Photo>? photos,
|
||||
Meal? currentMeal,
|
||||
List<Portion> portions,
|
||||
List<Photo> photos,
|
||||
Meal currentMeal,
|
||||
SelectionPopupModel? portionController,
|
||||
TimeOfDay? wakeupController,
|
||||
TimeOfDay? retireController,
|
||||
@@ -566,12 +566,12 @@ abstract class _$$DiaryStateLoadedImplCopyWith<$Res> {
|
||||
$Res call(
|
||||
{DiaryModel diary,
|
||||
String? diaryDate,
|
||||
List<dynamic>? autocompleteList,
|
||||
List<dynamic> autocompleteList,
|
||||
List<int> recommendedChartValues,
|
||||
List<int> consumedChartValues,
|
||||
List<Portion>? portions,
|
||||
List<Photo>? photos,
|
||||
Meal? currentMeal,
|
||||
List<Portion> portions,
|
||||
List<Photo> photos,
|
||||
Meal currentMeal,
|
||||
SelectionPopupModel? portionController,
|
||||
TimeOfDay? wakeupController,
|
||||
TimeOfDay? retireController,
|
||||
@@ -592,7 +592,7 @@ abstract class _$$DiaryStateLoadedImplCopyWith<$Res> {
|
||||
bool isAdded});
|
||||
|
||||
$DiaryModelCopyWith<$Res> get diary;
|
||||
$MealCopyWith<$Res>? get currentMeal;
|
||||
$MealCopyWith<$Res> get currentMeal;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@@ -608,12 +608,12 @@ class __$$DiaryStateLoadedImplCopyWithImpl<$Res>
|
||||
$Res call({
|
||||
Object? diary = null,
|
||||
Object? diaryDate = freezed,
|
||||
Object? autocompleteList = freezed,
|
||||
Object? autocompleteList = null,
|
||||
Object? recommendedChartValues = null,
|
||||
Object? consumedChartValues = null,
|
||||
Object? portions = freezed,
|
||||
Object? photos = freezed,
|
||||
Object? currentMeal = freezed,
|
||||
Object? portions = null,
|
||||
Object? photos = null,
|
||||
Object? currentMeal = null,
|
||||
Object? portionController = freezed,
|
||||
Object? wakeupController = freezed,
|
||||
Object? retireController = freezed,
|
||||
@@ -642,10 +642,10 @@ class __$$DiaryStateLoadedImplCopyWithImpl<$Res>
|
||||
? _value.diaryDate
|
||||
: diaryDate // ignore: cast_nullable_to_non_nullable
|
||||
as String?,
|
||||
autocompleteList: freezed == autocompleteList
|
||||
autocompleteList: null == autocompleteList
|
||||
? _value._autocompleteList
|
||||
: autocompleteList // ignore: cast_nullable_to_non_nullable
|
||||
as List<dynamic>?,
|
||||
as List<dynamic>,
|
||||
recommendedChartValues: null == recommendedChartValues
|
||||
? _value._recommendedChartValues
|
||||
: recommendedChartValues // ignore: cast_nullable_to_non_nullable
|
||||
@@ -654,18 +654,18 @@ class __$$DiaryStateLoadedImplCopyWithImpl<$Res>
|
||||
? _value._consumedChartValues
|
||||
: consumedChartValues // ignore: cast_nullable_to_non_nullable
|
||||
as List<int>,
|
||||
portions: freezed == portions
|
||||
portions: null == portions
|
||||
? _value._portions
|
||||
: portions // ignore: cast_nullable_to_non_nullable
|
||||
as List<Portion>?,
|
||||
photos: freezed == photos
|
||||
as List<Portion>,
|
||||
photos: null == photos
|
||||
? _value._photos
|
||||
: photos // ignore: cast_nullable_to_non_nullable
|
||||
as List<Photo>?,
|
||||
currentMeal: freezed == currentMeal
|
||||
as List<Photo>,
|
||||
currentMeal: null == currentMeal
|
||||
? _value.currentMeal
|
||||
: currentMeal // ignore: cast_nullable_to_non_nullable
|
||||
as Meal?,
|
||||
as Meal,
|
||||
portionController: freezed == portionController
|
||||
? _value.portionController
|
||||
: portionController // ignore: cast_nullable_to_non_nullable
|
||||
@@ -751,12 +751,8 @@ class __$$DiaryStateLoadedImplCopyWithImpl<$Res>
|
||||
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$MealCopyWith<$Res>? get currentMeal {
|
||||
if (_value.currentMeal == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return $MealCopyWith<$Res>(_value.currentMeal!, (value) {
|
||||
$MealCopyWith<$Res> get currentMeal {
|
||||
return $MealCopyWith<$Res>(_value.currentMeal, (value) {
|
||||
return _then(_value.copyWith(currentMeal: value));
|
||||
});
|
||||
}
|
||||
@@ -768,12 +764,12 @@ class _$DiaryStateLoadedImpl implements DiaryStateLoaded {
|
||||
const _$DiaryStateLoadedImpl(
|
||||
{required this.diary,
|
||||
this.diaryDate,
|
||||
final List<dynamic>? autocompleteList,
|
||||
required final List<dynamic> autocompleteList,
|
||||
required final List<int> recommendedChartValues,
|
||||
required final List<int> consumedChartValues,
|
||||
final List<Portion>? portions,
|
||||
final List<Photo>? photos,
|
||||
this.currentMeal,
|
||||
required final List<Portion> portions,
|
||||
required final List<Photo> photos,
|
||||
required this.currentMeal,
|
||||
this.portionController,
|
||||
this.wakeupController,
|
||||
this.retireController,
|
||||
@@ -802,15 +798,13 @@ class _$DiaryStateLoadedImpl implements DiaryStateLoaded {
|
||||
final DiaryModel diary;
|
||||
@override
|
||||
final String? diaryDate;
|
||||
final List<dynamic>? _autocompleteList;
|
||||
final List<dynamic> _autocompleteList;
|
||||
@override
|
||||
List<dynamic>? get autocompleteList {
|
||||
final value = _autocompleteList;
|
||||
if (value == null) return null;
|
||||
List<dynamic> get autocompleteList {
|
||||
if (_autocompleteList is EqualUnmodifiableListView)
|
||||
return _autocompleteList;
|
||||
// ignore: implicit_dynamic_type
|
||||
return EqualUnmodifiableListView(value);
|
||||
return EqualUnmodifiableListView(_autocompleteList);
|
||||
}
|
||||
|
||||
final List<int> _recommendedChartValues;
|
||||
@@ -831,28 +825,24 @@ class _$DiaryStateLoadedImpl implements DiaryStateLoaded {
|
||||
return EqualUnmodifiableListView(_consumedChartValues);
|
||||
}
|
||||
|
||||
final List<Portion>? _portions;
|
||||
final List<Portion> _portions;
|
||||
@override
|
||||
List<Portion>? get portions {
|
||||
final value = _portions;
|
||||
if (value == null) return null;
|
||||
List<Portion> get portions {
|
||||
if (_portions is EqualUnmodifiableListView) return _portions;
|
||||
// ignore: implicit_dynamic_type
|
||||
return EqualUnmodifiableListView(value);
|
||||
return EqualUnmodifiableListView(_portions);
|
||||
}
|
||||
|
||||
final List<Photo>? _photos;
|
||||
final List<Photo> _photos;
|
||||
@override
|
||||
List<Photo>? get photos {
|
||||
final value = _photos;
|
||||
if (value == null) return null;
|
||||
List<Photo> get photos {
|
||||
if (_photos is EqualUnmodifiableListView) return _photos;
|
||||
// ignore: implicit_dynamic_type
|
||||
return EqualUnmodifiableListView(value);
|
||||
return EqualUnmodifiableListView(_photos);
|
||||
}
|
||||
|
||||
@override
|
||||
final Meal? currentMeal;
|
||||
final Meal currentMeal;
|
||||
@override
|
||||
final SelectionPopupModel? portionController;
|
||||
@override
|
||||
@@ -997,12 +987,12 @@ class _$DiaryStateLoadedImpl implements DiaryStateLoaded {
|
||||
required TResult Function(
|
||||
DiaryModel diary,
|
||||
String? diaryDate,
|
||||
List<dynamic>? autocompleteList,
|
||||
List<dynamic> autocompleteList,
|
||||
List<int> recommendedChartValues,
|
||||
List<int> consumedChartValues,
|
||||
List<Portion>? portions,
|
||||
List<Photo>? photos,
|
||||
Meal? currentMeal,
|
||||
List<Portion> portions,
|
||||
List<Photo> photos,
|
||||
Meal currentMeal,
|
||||
SelectionPopupModel? portionController,
|
||||
TimeOfDay? wakeupController,
|
||||
TimeOfDay? retireController,
|
||||
@@ -1061,12 +1051,12 @@ class _$DiaryStateLoadedImpl implements DiaryStateLoaded {
|
||||
TResult? Function(
|
||||
DiaryModel diary,
|
||||
String? diaryDate,
|
||||
List<dynamic>? autocompleteList,
|
||||
List<dynamic> autocompleteList,
|
||||
List<int> recommendedChartValues,
|
||||
List<int> consumedChartValues,
|
||||
List<Portion>? portions,
|
||||
List<Photo>? photos,
|
||||
Meal? currentMeal,
|
||||
List<Portion> portions,
|
||||
List<Photo> photos,
|
||||
Meal currentMeal,
|
||||
SelectionPopupModel? portionController,
|
||||
TimeOfDay? wakeupController,
|
||||
TimeOfDay? retireController,
|
||||
@@ -1125,12 +1115,12 @@ class _$DiaryStateLoadedImpl implements DiaryStateLoaded {
|
||||
TResult Function(
|
||||
DiaryModel diary,
|
||||
String? diaryDate,
|
||||
List<dynamic>? autocompleteList,
|
||||
List<dynamic> autocompleteList,
|
||||
List<int> recommendedChartValues,
|
||||
List<int> consumedChartValues,
|
||||
List<Portion>? portions,
|
||||
List<Photo>? photos,
|
||||
Meal? currentMeal,
|
||||
List<Portion> portions,
|
||||
List<Photo> photos,
|
||||
Meal currentMeal,
|
||||
SelectionPopupModel? portionController,
|
||||
TimeOfDay? wakeupController,
|
||||
TimeOfDay? retireController,
|
||||
@@ -1227,12 +1217,12 @@ abstract class DiaryStateLoaded implements DiaryState {
|
||||
const factory DiaryStateLoaded(
|
||||
{required final DiaryModel diary,
|
||||
final String? diaryDate,
|
||||
final List<dynamic>? autocompleteList,
|
||||
required final List<dynamic> autocompleteList,
|
||||
required final List<int> recommendedChartValues,
|
||||
required final List<int> consumedChartValues,
|
||||
final List<Portion>? portions,
|
||||
final List<Photo>? photos,
|
||||
final Meal? currentMeal,
|
||||
required final List<Portion> portions,
|
||||
required final List<Photo> photos,
|
||||
required final Meal currentMeal,
|
||||
final SelectionPopupModel? portionController,
|
||||
final TimeOfDay? wakeupController,
|
||||
final TimeOfDay? retireController,
|
||||
@@ -1254,12 +1244,12 @@ abstract class DiaryStateLoaded implements DiaryState {
|
||||
|
||||
DiaryModel get diary;
|
||||
String? get diaryDate;
|
||||
List<dynamic>? get autocompleteList;
|
||||
List<dynamic> get autocompleteList;
|
||||
List<int> get recommendedChartValues;
|
||||
List<int> get consumedChartValues;
|
||||
List<Portion>? get portions;
|
||||
List<Photo>? get photos;
|
||||
Meal? get currentMeal;
|
||||
List<Portion> get portions;
|
||||
List<Photo> get photos;
|
||||
Meal get currentMeal;
|
||||
SelectionPopupModel? get portionController;
|
||||
TimeOfDay? get wakeupController;
|
||||
TimeOfDay? get retireController;
|
||||
@@ -1354,12 +1344,12 @@ class _$DiaryStateErrorImpl implements DiaryStateError {
|
||||
required TResult Function(
|
||||
DiaryModel diary,
|
||||
String? diaryDate,
|
||||
List<dynamic>? autocompleteList,
|
||||
List<dynamic> autocompleteList,
|
||||
List<int> recommendedChartValues,
|
||||
List<int> consumedChartValues,
|
||||
List<Portion>? portions,
|
||||
List<Photo>? photos,
|
||||
Meal? currentMeal,
|
||||
List<Portion> portions,
|
||||
List<Photo> photos,
|
||||
Meal currentMeal,
|
||||
SelectionPopupModel? portionController,
|
||||
TimeOfDay? wakeupController,
|
||||
TimeOfDay? retireController,
|
||||
@@ -1392,12 +1382,12 @@ class _$DiaryStateErrorImpl implements DiaryStateError {
|
||||
TResult? Function(
|
||||
DiaryModel diary,
|
||||
String? diaryDate,
|
||||
List<dynamic>? autocompleteList,
|
||||
List<dynamic> autocompleteList,
|
||||
List<int> recommendedChartValues,
|
||||
List<int> consumedChartValues,
|
||||
List<Portion>? portions,
|
||||
List<Photo>? photos,
|
||||
Meal? currentMeal,
|
||||
List<Portion> portions,
|
||||
List<Photo> photos,
|
||||
Meal currentMeal,
|
||||
SelectionPopupModel? portionController,
|
||||
TimeOfDay? wakeupController,
|
||||
TimeOfDay? retireController,
|
||||
@@ -1430,12 +1420,12 @@ class _$DiaryStateErrorImpl implements DiaryStateError {
|
||||
TResult Function(
|
||||
DiaryModel diary,
|
||||
String? diaryDate,
|
||||
List<dynamic>? autocompleteList,
|
||||
List<dynamic> autocompleteList,
|
||||
List<int> recommendedChartValues,
|
||||
List<int> consumedChartValues,
|
||||
List<Portion>? portions,
|
||||
List<Photo>? photos,
|
||||
Meal? currentMeal,
|
||||
List<Portion> portions,
|
||||
List<Photo> photos,
|
||||
Meal currentMeal,
|
||||
SelectionPopupModel? portionController,
|
||||
TimeOfDay? wakeupController,
|
||||
TimeOfDay? retireController,
|
||||
|
||||
Reference in New Issue
Block a user