refactored recipe provider

This commit is contained in:
SomnusVeritas committed 2023-11-01 14:37:04 +01:00
1 parent a29f37b0e8
commit c537acc796
4 files changed
+23 -22

No files matched your search

+6
View File
@@ -8,4 +8,10 @@ class IngredientListEntry {
final bool optional;
IngredientListEntry(this.ingredient, this.amount, this.unit, this.optional);
@override
operator ==(Object other) {
final i = other as IngredientListEntry;
return ingredient == i.ingredient;
}
}
+2 -2
View File
@@ -1,12 +1,12 @@
import 'difficulty.dart';
import 'ingredient.dart';
import 'cooking_step.dart';
import 'ingredient_list_entry.dart';
class Recipe {
final String title;
final String description;
final Difficulty? difficulty;
final List<Ingredient> ingredients = [];
final List<IngredientListEntry> ingredients = [];
final List<CookingStep> steps = [];
Recipe({