refactored recipe provider
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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({
|
||||
|
||||
Reference in New Issue
Block a user