-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7910132
commit cc41777
Showing
1 changed file
with
113 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,150 @@ | ||
class Recipe { | ||
String label; | ||
String imageUrl; | ||
// TODO: Add servings and ingredients | ||
int servings; | ||
List<Ingredient> ingredients; | ||
|
||
Recipe( | ||
this.label, | ||
this.imageUrl, | ||
this.servings, | ||
this.ingredients, | ||
); | ||
|
||
static List<Recipe> samples = [ | ||
Recipe( | ||
'Spaghetti and Meatballs', | ||
'assets/2126711929_ef763de2b3_w.jpg', | ||
4, | ||
[ | ||
Ingredient( | ||
1, | ||
'box', | ||
'Spaghetti', | ||
), | ||
Ingredient( | ||
4, | ||
'', | ||
'Frozen Meatballs', | ||
), | ||
Ingredient( | ||
0.5, | ||
'jar', | ||
'sauce', | ||
), | ||
], | ||
), | ||
Recipe( | ||
'Tomato Soup', | ||
'assets/27729023535_a57606c1be.jpg', | ||
2, | ||
[ | ||
Ingredient( | ||
1, | ||
'can', | ||
'Tomato Soup', | ||
), | ||
], | ||
), | ||
Recipe( | ||
'Grilled Cheese', | ||
'assets/3187380632_5056654a19_b.jpg', | ||
1, | ||
[ | ||
Ingredient( | ||
2, | ||
'slices', | ||
'Cheese', | ||
), | ||
Ingredient( | ||
2, | ||
'slices', | ||
'Bread', | ||
), | ||
], | ||
), | ||
Recipe( | ||
'Chocolate Chip Cookies', | ||
'assets/15992102771_b92f4cc00a_b.jpg', | ||
24, | ||
[ | ||
Ingredient( | ||
4, | ||
'cups', | ||
'flour', | ||
), | ||
Ingredient( | ||
2, | ||
'cups', | ||
'sugar', | ||
), | ||
Ingredient( | ||
0.5, | ||
'cups', | ||
'chocolate chips', | ||
), | ||
], | ||
), | ||
Recipe( | ||
'Taco Salad', | ||
'assets/8533381643_a31a99e8a6_c.jpg', | ||
1, | ||
[ | ||
Ingredient( | ||
4, | ||
'oz', | ||
'nachos', | ||
), | ||
Ingredient( | ||
3, | ||
'oz', | ||
'taco meat', | ||
), | ||
Ingredient( | ||
0.5, | ||
'cup', | ||
'cheese', | ||
), | ||
Ingredient( | ||
0.25, | ||
'cup', | ||
'chopped tomatoes', | ||
), | ||
], | ||
), | ||
Recipe( | ||
'Hawaiian Pizza', | ||
'assets/15452035777_294cefced5_c.jpg', | ||
4, | ||
[ | ||
Ingredient( | ||
1, | ||
'item', | ||
'pizza', | ||
), | ||
Ingredient( | ||
1, | ||
'cup', | ||
'pineapple', | ||
), | ||
Ingredient( | ||
8, | ||
'oz', | ||
'ham', | ||
), | ||
], | ||
), | ||
]; | ||
} | ||
|
||
// TODO: Add ingredient() here | ||
class Ingredient { | ||
double quantity; | ||
String measure; | ||
String name; | ||
|
||
Ingredient( | ||
this.quantity, | ||
this.measure, | ||
this.name, | ||
); | ||
} |