Skip to content

Instantly share code, notes, and snippets.

Created September 10, 2022 04:23
What would you like to do?
void main() {
List<Meal> meals = [
id: 'm1',
categories: [
title: 'Spaghetti with Tomato Sauce',
affordability: Affordability.affordable,
complexity: Complexity.simple,
duration: 20,
ingredients: [
'4 Tomatoes',
'1 Tablespoon of Olive Oil',
'1 Onion',
'250g Spaghetti',
'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.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