feat(diary): Added portion change (pcs gr)

This commit is contained in:
2024-04-01 13:24:56 +03:00
parent aa9ccd26e7
commit ce19460af3
6 changed files with 87 additions and 27 deletions

View File

@@ -6,17 +6,20 @@ import 'package:eatvio_app/data/models/selectionPopupModel/selection_popup_model
/// This class defines the variables used in the [k0_page],
/// and is typically used to hold data that is passed between different parts of the application.
class DiaryEditModel extends Equatable {
DiaryEditModel({this.mealList = const []});
DiaryEditModel({this.mealList = const [], this.portionList = const []});
List<SelectionPopupModel> mealList;
List<SelectionPopupModel>? portionList;
DiaryEditModel copyWith({
List<SelectionPopupModel>? mealList,
List<SelectionPopupModel>? portionList,
}) {
return DiaryEditModel(
mealList: mealList ?? this.mealList,
portionList: portionList ?? this.portionList,
);
}
@override
List<Object?> get props => [mealList];
List<Object?> get props => [mealList, portionList];
}