changed recipe class
This commit is contained in:
1 parent
3186ec8780
commit
509f1fd695
2 files changed
+13
-2
No files matched your search
@@ -23,6 +23,13 @@ class RecipeProvider extends ChangeNotifier {
|
||||
}
|
||||
}
|
||||
|
||||
void updateServingSize(int servingSize, {bool silent = false}) {
|
||||
_recipe = _recipe.copyWith(servingSize: servingSize);
|
||||
if (!silent) {
|
||||
notifyListeners();
|
||||
}
|
||||
}
|
||||
|
||||
void updateDifficulty(Difficulty difficulty, {bool silent = false}) {
|
||||
_recipe = _recipe.copyWith(difficulty: difficulty);
|
||||
if (!silent) {
|
||||
@@ -73,14 +80,14 @@ class RecipeProvider extends ChangeNotifier {
|
||||
}
|
||||
}
|
||||
|
||||
void updateMealCategory(MealCategory mealCategory, {bool silent = false}) {
|
||||
void updateMealCategory(MealCategory? mealCategory, {bool silent = false}) {
|
||||
_recipe = _recipe.copyWith(mealCategory: mealCategory);
|
||||
if (!silent) {
|
||||
notifyListeners();
|
||||
}
|
||||
}
|
||||
|
||||
void updateCuisine(Cuisine cuisine, {bool silent = false}) {
|
||||
void updateCuisine(Cuisine? cuisine, {bool silent = false}) {
|
||||
_recipe = _recipe.copyWith(cuisine: cuisine);
|
||||
if (!silent) {
|
||||
notifyListeners();
|
||||
|
||||
Reference in new issue
Block a user