forked from eatvio/eatvio_app
refatcor(diary): Refactored (doesn't work yet though)
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
import 'package:eatvio_app/features/diary/models/diary_model.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:freezed_annotation/freezed_annotation.dart';
|
||||
|
||||
import '../../../../data/models/selectionPopupModel/selection_popup_model.dart';
|
||||
|
||||
part 'diary_state.freezed.dart';
|
||||
|
||||
@freezed
|
||||
@@ -11,6 +14,31 @@ abstract class DiaryState with _$DiaryState {
|
||||
|
||||
const factory DiaryState.loaded({
|
||||
required DiaryModel diary,
|
||||
String? diaryDate,
|
||||
List<dynamic>? autocompleteList,
|
||||
required List<int> recommendedChartValues,
|
||||
required List<int> consumedChartValues,
|
||||
List<Portion>? portions,
|
||||
List<Photo>? photos,
|
||||
Meal? currentMeal,
|
||||
SelectionPopupModel? portionController,
|
||||
TimeOfDay? wakeupController,
|
||||
TimeOfDay? retireController,
|
||||
TimeOfDay? mealTimeController,
|
||||
required TextEditingController? commentController,
|
||||
required TextEditingController? productNameController,
|
||||
required TextEditingController? productQuantityController,
|
||||
required TextEditingController? caloriesController,
|
||||
required TextEditingController? fatsController,
|
||||
required TextEditingController? proteinsController,
|
||||
required TextEditingController? carbsController,
|
||||
int? selectedMood,
|
||||
int? selectedSatiety,
|
||||
required bool wakeupExpanded,
|
||||
required bool moderationExpanded,
|
||||
required bool moodExpanded,
|
||||
required bool isLoading,
|
||||
required bool isAdded,
|
||||
}) = DiaryStateLoaded;
|
||||
|
||||
const factory DiaryState.error({
|
||||
|
||||
Reference in New Issue
Block a user