Skip to content

Instantly share code, notes, and snippets.

@Quingsley
Created September 10, 2022 04:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Quingsley/6a123cc9ee37fc7febd328a232e7e144 to your computer and use it in GitHub Desktop.
Save Quingsley/6a123cc9ee37fc7febd328a232e7e144 to your computer and use it in GitHub Desktop.
jade-tundra-8183
void main() {
List<Meal> meals = [
Meal(
id: 'm1',
categories: [
'c1',
'c2',
],
title: 'Spaghetti with Tomato Sauce',
affordability: Affordability.affordable,
complexity: Complexity.simple,
imageUrl:
'https://upload.wikimedia.org/wikipedia/commons/thumb/2/20/Spaghetti_Bolognese_mit_Parmesan_oder_Grana_Padano.jpg/800px-Spaghetti_Bolognese_mit_Parmesan_oder_Grana_Padano.jpg',
duration: 20,
ingredients: [
'4 Tomatoes',
'1 Tablespoon of Olive Oil',
'1 Onion',
'250g Spaghetti',
'Spices',
'Cheese (optional)'
],
steps: [
'Cut the tomatoes and the onion into small pieces.',
'Boil some water - add salt to it once it boils.',
'Put the spaghetti into the boiling water - they should be done in about 10 to 12 minutes.',
'In the meantime, heaten up some olive oil and add the cut onion.',
'After 2 minutes, add the tomato pieces, salt, pepper and your other spices.',
'The sauce will be done once the spaghetti are.',
'Feel free to add some cheese on top of the finished dish.'
],
isGlutenFree: false,
isVegan: true,
isVegetarian: true,
isLactoseFree: true,
),
];
}
enum Complexity { simple, challenging, hard }
enum Affordability { affordable, pricey, luxurious }
class Meal {
final String id;
final String title;
final List<String> categories;
final String imageUrl;
final List<String> ingredients;
final List<String> steps;
final int duration;
final Complexity complexity;
final Affordability affordability;
final bool isGlutenFree;
final bool isVegan;
final bool isLactoseFree;
final bool isVegetarian;
const Meal({
required this.title,
required this.id,
required this.categories,
required this.imageUrl,
required this.ingredients,
required this.steps,
required this.duration,
required this.complexity,
required this.affordability,
required this.isGlutenFree,
required this.isVegan,
required this.isLactoseFree,
required this.isVegetarian
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment