diff --git a/veggieseasons/assets/images/apple.jpg b/veggieseasons/assets/images/apple.jpg new file mode 100644 index 000000000..730588070 Binary files /dev/null and b/veggieseasons/assets/images/apple.jpg differ diff --git a/veggieseasons/assets/images/artichoke.jpg b/veggieseasons/assets/images/artichoke.jpg new file mode 100644 index 000000000..43337dda5 Binary files /dev/null and b/veggieseasons/assets/images/artichoke.jpg differ diff --git a/veggieseasons/assets/images/asparagus.jpg b/veggieseasons/assets/images/asparagus.jpg new file mode 100644 index 000000000..76d340e85 Binary files /dev/null and b/veggieseasons/assets/images/asparagus.jpg differ diff --git a/veggieseasons/assets/images/avocado.jpg b/veggieseasons/assets/images/avocado.jpg new file mode 100644 index 000000000..16ec1e706 Binary files /dev/null and b/veggieseasons/assets/images/avocado.jpg differ diff --git a/veggieseasons/assets/images/blackberry.jpg b/veggieseasons/assets/images/blackberry.jpg new file mode 100644 index 000000000..4d8193a82 Binary files /dev/null and b/veggieseasons/assets/images/blackberry.jpg differ diff --git a/veggieseasons/assets/images/canteloupe.jpg b/veggieseasons/assets/images/canteloupe.jpg new file mode 100644 index 000000000..f048570c6 Binary files /dev/null and b/veggieseasons/assets/images/canteloupe.jpg differ diff --git a/veggieseasons/assets/images/cauliflower.jpg b/veggieseasons/assets/images/cauliflower.jpg new file mode 100644 index 000000000..ce2aa917c Binary files /dev/null and b/veggieseasons/assets/images/cauliflower.jpg differ diff --git a/veggieseasons/assets/images/endive.jpg b/veggieseasons/assets/images/endive.jpg new file mode 100644 index 000000000..80c5b7e1a Binary files /dev/null and b/veggieseasons/assets/images/endive.jpg differ diff --git a/veggieseasons/assets/images/fig.jpg b/veggieseasons/assets/images/fig.jpg new file mode 100644 index 000000000..baaeafe26 Binary files /dev/null and b/veggieseasons/assets/images/fig.jpg differ diff --git a/veggieseasons/assets/images/grape.jpg b/veggieseasons/assets/images/grape.jpg new file mode 100644 index 000000000..94cd645cb Binary files /dev/null and b/veggieseasons/assets/images/grape.jpg differ diff --git a/veggieseasons/assets/images/green_bell_pepper.jpg b/veggieseasons/assets/images/green_bell_pepper.jpg new file mode 100644 index 000000000..f9fac8c47 Binary files /dev/null and b/veggieseasons/assets/images/green_bell_pepper.jpg differ diff --git a/veggieseasons/assets/images/habanero.jpg b/veggieseasons/assets/images/habanero.jpg new file mode 100644 index 000000000..3d85abd69 Binary files /dev/null and b/veggieseasons/assets/images/habanero.jpg differ diff --git a/veggieseasons/assets/images/kale.jpg b/veggieseasons/assets/images/kale.jpg new file mode 100644 index 000000000..7a099295d Binary files /dev/null and b/veggieseasons/assets/images/kale.jpg differ diff --git a/veggieseasons/assets/images/kiwi.jpg b/veggieseasons/assets/images/kiwi.jpg new file mode 100644 index 000000000..21be2a60a Binary files /dev/null and b/veggieseasons/assets/images/kiwi.jpg differ diff --git a/veggieseasons/assets/images/lemon.jpg b/veggieseasons/assets/images/lemon.jpg new file mode 100644 index 000000000..62bd7853a Binary files /dev/null and b/veggieseasons/assets/images/lemon.jpg differ diff --git a/veggieseasons/assets/images/lime.jpg b/veggieseasons/assets/images/lime.jpg new file mode 100644 index 000000000..a9878a5ef Binary files /dev/null and b/veggieseasons/assets/images/lime.jpg differ diff --git a/veggieseasons/assets/images/mango.jpg b/veggieseasons/assets/images/mango.jpg new file mode 100644 index 000000000..27a82e5f5 Binary files /dev/null and b/veggieseasons/assets/images/mango.jpg differ diff --git a/veggieseasons/assets/images/mushroom.jpg b/veggieseasons/assets/images/mushroom.jpg new file mode 100644 index 000000000..a12fc6943 Binary files /dev/null and b/veggieseasons/assets/images/mushroom.jpg differ diff --git a/veggieseasons/assets/images/nectarine.jpg b/veggieseasons/assets/images/nectarine.jpg new file mode 100644 index 000000000..24b55b7ec Binary files /dev/null and b/veggieseasons/assets/images/nectarine.jpg differ diff --git a/veggieseasons/assets/images/orange_bell_pepper.jpg b/veggieseasons/assets/images/orange_bell_pepper.jpg new file mode 100644 index 000000000..2f789104a Binary files /dev/null and b/veggieseasons/assets/images/orange_bell_pepper.jpg differ diff --git a/veggieseasons/assets/images/persimmon.jpg b/veggieseasons/assets/images/persimmon.jpg new file mode 100644 index 000000000..c0e5d076a Binary files /dev/null and b/veggieseasons/assets/images/persimmon.jpg differ diff --git a/veggieseasons/assets/images/placeholder.png b/veggieseasons/assets/images/placeholder.png deleted file mode 100644 index d6a458052..000000000 Binary files a/veggieseasons/assets/images/placeholder.png and /dev/null differ diff --git a/veggieseasons/assets/images/plum.jpg b/veggieseasons/assets/images/plum.jpg new file mode 100644 index 000000000..743c7a485 Binary files /dev/null and b/veggieseasons/assets/images/plum.jpg differ diff --git a/veggieseasons/assets/images/potato.jpg b/veggieseasons/assets/images/potato.jpg new file mode 100644 index 000000000..0f09e21de Binary files /dev/null and b/veggieseasons/assets/images/potato.jpg differ diff --git a/veggieseasons/assets/images/radicchio.jpg b/veggieseasons/assets/images/radicchio.jpg new file mode 100644 index 000000000..acd8f6649 Binary files /dev/null and b/veggieseasons/assets/images/radicchio.jpg differ diff --git a/veggieseasons/assets/images/radish.jpg b/veggieseasons/assets/images/radish.jpg new file mode 100644 index 000000000..0dcbfb734 Binary files /dev/null and b/veggieseasons/assets/images/radish.jpg differ diff --git a/veggieseasons/assets/images/squash.jpg b/veggieseasons/assets/images/squash.jpg new file mode 100644 index 000000000..d20b745cd Binary files /dev/null and b/veggieseasons/assets/images/squash.jpg differ diff --git a/veggieseasons/assets/images/strawberry.jpg b/veggieseasons/assets/images/strawberry.jpg new file mode 100644 index 000000000..feecd8a40 Binary files /dev/null and b/veggieseasons/assets/images/strawberry.jpg differ diff --git a/veggieseasons/assets/images/tangelo.jpg b/veggieseasons/assets/images/tangelo.jpg new file mode 100644 index 000000000..83c0a0376 Binary files /dev/null and b/veggieseasons/assets/images/tangelo.jpg differ diff --git a/veggieseasons/assets/images/tomato.jpg b/veggieseasons/assets/images/tomato.jpg new file mode 100644 index 000000000..ab36947be Binary files /dev/null and b/veggieseasons/assets/images/tomato.jpg differ diff --git a/veggieseasons/assets/images/watermelon.jpg b/veggieseasons/assets/images/watermelon.jpg new file mode 100644 index 000000000..43880ba89 Binary files /dev/null and b/veggieseasons/assets/images/watermelon.jpg differ diff --git a/veggieseasons/lib/data/model.dart b/veggieseasons/lib/data/app_state.dart similarity index 100% rename from veggieseasons/lib/data/model.dart rename to veggieseasons/lib/data/app_state.dart diff --git a/veggieseasons/lib/data/local_veggie_provider.dart b/veggieseasons/lib/data/local_veggie_provider.dart index 0eddc77df..302994871 100644 --- a/veggieseasons/lib/data/local_veggie_provider.dart +++ b/veggieseasons/lib/data/local_veggie_provider.dart @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +import 'package:flutter/cupertino.dart'; import 'package:veggieseasons/data/veggie.dart'; class LocalVeggieProvider { @@ -9,584 +10,273 @@ class LocalVeggieProvider { Veggie( id: 1, name: 'Apples', - imageAssetPath: 'assets/images/placeholder.png', + imageAssetPath: 'assets/images/apple.jpg', category: VeggieCategory.fruit, shortDescription: 'Green or red, they\'re generally round and tasty.', - accentColor: 0xff206010, + accentColor: Color(0x40de8c66), seasons: [Season.winter, Season.spring, Season.summer, Season.autumn], ), Veggie( id: 2, - name: 'Apricots', - imageAssetPath: 'assets/images/placeholder.png', - category: VeggieCategory.stoneFruit, - shortDescription: 'Dried or in jam, they add a tasty zing to recipes.', - accentColor: 0xff206010, - seasons: [Season.spring, Season.summer], + name: 'Artichokes', + imageAssetPath: 'assets/images/artichoke.jpg', + category: VeggieCategory.flower, + shortDescription: 'The armadillo of vegetables.', + accentColor: Color(0x408ea26d), + seasons: [Season.autumn, Season.spring], ), Veggie( id: 3, name: 'Asparagus', - imageAssetPath: 'assets/images/placeholder.png', + imageAssetPath: 'assets/images/asparagus.jpg', category: VeggieCategory.fern, shortDescription: 'It\'s been used a food and medicine for millenia.', - accentColor: 0xff206010, + accentColor: Color(0x408cb437), seasons: [Season.spring], ), Veggie( id: 4, name: 'Avocado', - imageAssetPath: 'assets/images/placeholder.png', + imageAssetPath: 'assets/images/avocado.jpg', category: VeggieCategory.stealthFruit, shortDescription: 'One of the oiliest, richest vegetables money can buy.', - accentColor: 0xff206010, + accentColor: Color(0x40b0ba59), seasons: [Season.winter, Season.spring, Season.summer], ), Veggie( id: 5, - name: 'Bananas', - imageAssetPath: 'assets/images/placeholder.png', - category: VeggieCategory.tropical, - shortDescription: 'You\'re probably opening the wrong end.', - accentColor: 0xff206010, - seasons: [Season.winter, Season.spring, Season.summer, Season.autumn], + name: 'Blackberries', + imageAssetPath: 'assets/images/blackberry.jpg', + category: VeggieCategory.berry, + shortDescription: 'Find them on backroads and fences in the Northwest.', + accentColor: Color(0x409d5adb), + seasons: [Season.summer], ), Veggie( id: 6, - name: 'Beets', - imageAssetPath: 'assets/images/placeholder.png', - category: VeggieCategory.root, - shortDescription: 'Rich, earthy beets add hearty notes to many dishes.', - accentColor: 0xff206010, - seasons: [Season.winter, Season.summer, Season.autumn], + name: 'Canteloupe', + imageAssetPath: 'assets/images/canteloupe.jpg', + category: VeggieCategory.melon, + shortDescription: 'A fruit so tasty there\'s a utensil just for it.', + accentColor: Color(0x40f6bd56), + seasons: [Season.summer], ), Veggie( id: 7, - name: 'Bell Peppers', - imageAssetPath: 'assets/images/placeholder.png', - category: VeggieCategory.stealthFruit, - shortDescription: 'All the colors of a traffic light, in veggie form.', - accentColor: 0xff206010, - seasons: [Season.summer, Season.autumn], - ), - Veggie( - id: 8, - name: 'Blackberries', - imageAssetPath: 'assets/images/placeholder.png', - category: VeggieCategory.berry, - shortDescription: 'Find them on backroads and fences in the Northwest.', - accentColor: 0xff206010, - seasons: [Season.summer], - ), - Veggie( - id: 9, - name: 'Blueberries', - imageAssetPath: 'assets/images/placeholder.png', - category: VeggieCategory.berry, - shortDescription: 'Popular in pies, they macerate nicely.', - accentColor: 0xff206010, - seasons: [Season.summer], - ), - Veggie( - id: 10, - name: 'Broccoli', - imageAssetPath: 'assets/images/placeholder.png', - category: VeggieCategory.cruciferous, - shortDescription: 'Try garlic salt and oven-frying for a tasty treat.', - accentColor: 0xff206010, - seasons: [Season.spring, Season.autumn], - ), - Veggie( - id: 11, - name: 'Brussels Sprouts', - imageAssetPath: 'assets/images/placeholder.png', - category: VeggieCategory.cruciferous, - shortDescription: - 'They\'re basically tiny cabbages. Everyone knows this.', - accentColor: 0xff206010, - seasons: [Season.winter, Season.autumn], - ), - Veggie( - id: 12, - name: 'Cabbage', - imageAssetPath: 'assets/images/placeholder.png', - category: VeggieCategory.cruciferous, - shortDescription: 'Lettuce\'s tougher, meaner cousin.', - accentColor: 0xff206010, - seasons: [Season.winter, Season.spring, Season.autumn], - ), - Veggie( - id: 13, - name: 'Canteloupe', - imageAssetPath: 'assets/images/placeholder.png', - category: VeggieCategory.melon, - shortDescription: 'A fruit so tasty there\'s a utensil just for it.', - accentColor: 0xff206010, - seasons: [Season.summer], - ), - Veggie( - id: 14, - name: 'Carrots', - imageAssetPath: 'assets/images/placeholder.png', - category: VeggieCategory.root, - shortDescription: 'They come in a variety of colors and shapes.', - accentColor: 0xff206010, - seasons: [Season.winter, Season.spring, Season.summer, Season.autumn], - ), - Veggie( - id: 15, name: 'Cauliflower', - imageAssetPath: 'assets/images/placeholder.png', + imageAssetPath: 'assets/images/cauliflower.jpg', category: VeggieCategory.cruciferous, shortDescription: 'Looks like white broccoli and explodes when cut.', - accentColor: 0xff206010, + accentColor: Color(0x40c891a8), seasons: [Season.autumn], ), Veggie( - id: 16, - name: 'Celery', - imageAssetPath: 'assets/images/placeholder.png', - category: VeggieCategory.leafy, - shortDescription: 'One of the holy trinity of Cajun cuisine.', - accentColor: 0xff206010, - seasons: [Season.winter, Season.spring, Season.summer, Season.autumn], + id: 8, + name: 'Endive', + imageAssetPath: 'assets/images/endive.jpg', + category: VeggieCategory.gourd, + shortDescription: 'It\'s basically the veal of lettuce.', + accentColor: Color(0x40c5be53), + seasons: [Season.winter, Season.autumn, Season.spring], ), Veggie( - id: 17, - name: 'Cherries', - imageAssetPath: 'assets/images/placeholder.png', + id: 9, + name: 'Figs', + imageAssetPath: 'assets/images/fig.jpg', + category: VeggieCategory.fruit, + shortDescription: 'Delicious when sliced and wrapped in prosciutto.', + accentColor: Color(0x40aa6d7c), + seasons: [Season.autumn, Season.summer], + ), + Veggie( + id: 10, + name: 'Grapes', + imageAssetPath: 'assets/images/grape.jpg', category: VeggieCategory.berry, - shortDescription: 'Great for topping sundaes and such.', - accentColor: 0xff206010, + shortDescription: 'Couldn\'t have wine without them.', + accentColor: Color(0x40ac708a), + seasons: [Season.autumn], + ), + Veggie( + id: 11, + name: 'Green Pepper', + imageAssetPath: 'assets/images/green_bell_pepper.jpg', + category: VeggieCategory.stealthFruit, + shortDescription: 'Pleasantly bitter, like a sad movie.', + accentColor: Color(0x408eb332), seasons: [Season.summer], ), Veggie( - id: 18, - name: 'Collard Greens', - imageAssetPath: 'assets/images/placeholder.png', + id: 12, + name: 'Habanero', + imageAssetPath: 'assets/images/habanero.jpg', + category: VeggieCategory.stealthFruit, + shortDescription: 'Delicious... in extremely small quantities.', + accentColor: Color(0x40ff7a01), + seasons: [Season.autumn, Season.summer], + ), + Veggie( + id: 13, + name: 'Kale', + imageAssetPath: 'assets/images/kale.jpg', category: VeggieCategory.cruciferous, - shortDescription: 'Slow cook \'em with a ham hock or two.', - accentColor: 0xff206010, - seasons: [Season.spring, Season.summer, Season.autumn], + shortDescription: 'The meanest vegetable. Does not want to be eaten.', + accentColor: Color(0x40a86bd8), + seasons: [Season.winter, Season.autumn], + ), + Veggie( + id: 14, + name: 'Kiwi', + imageAssetPath: 'assets/images/kiwi.jpg', + category: VeggieCategory.berry, + shortDescription: 'Also known as Chinese gooseberry.', + accentColor: Color(0x40b47b37), + seasons: [Season.summer], + ), + Veggie( + id: 15, + name: 'Lemons', + imageAssetPath: 'assets/images/lemon.jpg', + category: VeggieCategory.citrus, + shortDescription: 'Similar to limes, only yellow.', + accentColor: Color(0x40e2a500), + seasons: [Season.winter], + ), + Veggie( + id: 16, + name: 'Limes', + imageAssetPath: 'assets/images/lime.jpg', + category: VeggieCategory.citrus, + shortDescription: 'Couldn\'t have ceviche and margaritas without them.', + accentColor: Color(0x4089b733), + seasons: [Season.winter], + ), + Veggie( + id: 17, + name: 'Mangos', + imageAssetPath: 'assets/images/mango.jpg', + category: VeggieCategory.tropical, + shortDescription: 'A fun orange fruit popular with smoothie enthusiasts.', + accentColor: Color(0x40fcc93c), + seasons: [Season.summer, Season.autumn], + ), + Veggie( + id: 18, + name: 'Mushrooms', + imageAssetPath: 'assets/images/mushroom.jpg', + category: VeggieCategory.fungus, + shortDescription: 'They\'re not truffles, but they\'re still tasty.', + accentColor: Color(0x40ba754b), + seasons: [Season.spring, Season.autumn], ), Veggie( id: 19, - name: 'Corn', - imageAssetPath: 'assets/images/placeholder.png', - category: VeggieCategory.stealthFruit, - shortDescription: 'Popped, roasted, creamed or grilled, it\'s all good.', - accentColor: 0xff206010, + name: 'Nectarines', + imageAssetPath: 'assets/images/nectarine.jpg', + category: VeggieCategory.stoneFruit, + shortDescription: 'Tiny, bald peaches.', + accentColor: Color(0x40e45b3b), seasons: [Season.summer], ), Veggie( id: 20, - name: 'Cranberries', - imageAssetPath: 'assets/images/placeholder.png', - category: VeggieCategory.berry, - shortDescription: 'A popular juice when mixed with other fruits.', - accentColor: 0xff206010, - seasons: [Season.autumn], + name: 'Persimmons', + imageAssetPath: 'assets/images/persimmon.jpg', + category: VeggieCategory.fruit, + shortDescription: 'It\'s like a plum and an apple had a baby together.', + accentColor: Color(0x40979852), + seasons: [Season.winter, Season.autumn], ), Veggie( id: 21, - name: 'Cucumbers', - imageAssetPath: 'assets/images/placeholder.png', - category: VeggieCategory.gourd, - shortDescription: - 'Crisp, clean, and a surprisingly good veggie to juice.', - accentColor: 0xff206010, + name: 'Plums', + imageAssetPath: 'assets/images/plum.jpg', + category: VeggieCategory.stoneFruit, + shortDescription: 'Popular in fruit salads and children\'s tales.', + accentColor: Color(0x40e48b47), seasons: [Season.summer], ), Veggie( id: 22, - name: 'Eggplant', - imageAssetPath: 'assets/images/placeholder.png', - category: VeggieCategory.stealthFruit, - shortDescription: 'Big and purple. That\'s about it.', - accentColor: 0xff206010, - seasons: [Season.summer], + name: 'Potatoes', + imageAssetPath: 'assets/images/potato.jpg', + category: VeggieCategory.tuber, + shortDescription: 'King of starches and giver of french fries.', + accentColor: Color(0x40c65c63), + seasons: [Season.winter, Season.autumn], ), Veggie( id: 23, - name: 'Garlic', - imageAssetPath: 'assets/images/placeholder.png', - category: VeggieCategory.allium, - shortDescription: 'Can flavor your food in innumerable ways.', - accentColor: 0xff206010, - seasons: [Season.spring, Season.summer, Season.autumn], + name: 'Radicchio', + imageAssetPath: 'assets/images/radicchio.jpg', + category: VeggieCategory.leafy, + shortDescription: 'It\'s that bitter taste in the salad you\'re eating.', + accentColor: Color(0x40d75875), + seasons: [Season.autumn, Season.spring], ), Veggie( id: 24, - name: 'Ginger', - imageAssetPath: 'assets/images/placeholder.png', - category: VeggieCategory.tropical, - shortDescription: 'Quick tip: Peel, blend, and freeze ginger for later.', - accentColor: 0xff206010, - seasons: [Season.autumn], - ), - Veggie( - id: 25, - name: 'Grapefruit', - imageAssetPath: 'assets/images/placeholder.png', - category: VeggieCategory.citrus, - shortDescription: 'Ruby red for juice, and regular ones for breakfast.', - accentColor: 0xff206010, - seasons: [ - Season.winter, - ], - ), - Veggie( - id: 26, - name: 'Grapes', - imageAssetPath: 'assets/images/placeholder.png', - category: VeggieCategory.berry, - shortDescription: 'Couldn\'t have wine without them.', - accentColor: 0xff206010, - seasons: [Season.autumn], - ), - Veggie( - id: 26, - name: 'Green Beans', - imageAssetPath: 'assets/images/placeholder.png', - category: VeggieCategory.legume, - shortDescription: 'Popular with toddlers and in hamburger hot dish.', - accentColor: 0xff206010, - seasons: [Season.summer], - ), - Veggie( - id: 27, - name: 'Greens', - imageAssetPath: 'assets/images/placeholder.png', - category: VeggieCategory.leafy, - shortDescription: 'Salad when raw, side dish when slow-cooked.', - accentColor: 0xff206010, + name: 'Radishes', + imageAssetPath: 'assets/images/radish.jpg', + category: VeggieCategory.root, + shortDescription: 'Try roasting them in addition to slicing them up raw.', + accentColor: Color(0x40819e4e), seasons: [Season.spring, Season.autumn], ), + Veggie( + id: 25, + name: 'Squash', + imageAssetPath: 'assets/images/squash.jpg', + category: VeggieCategory.gourd, + shortDescription: 'Bigger and heartier than summer squashes.', + accentColor: Color(0x40dbb721), + seasons: [Season.winter, Season.autumn], + ), + Veggie( + id: 26, + name: 'Strawberries', + imageAssetPath: 'assets/images/strawberry.jpg', + category: VeggieCategory.berry, + shortDescription: + 'A delicious fruit that keeps its seeds on the outside.', + accentColor: Color(0x40f06a44), + seasons: [Season.spring, Season.summer], + ), + Veggie( + id: 27, + name: 'Tangelo', + imageAssetPath: 'assets/images/tangelo.jpg', + category: VeggieCategory.citrus, + shortDescription: 'No one\'s sure what they are or where they came from.', + accentColor: Color(0x40f88c06), + seasons: [Season.winter, Season.autumn], + ), Veggie( id: 28, - name: 'Honeydew Melon', - imageAssetPath: 'assets/images/placeholder.png', - category: VeggieCategory.melon, - shortDescription: 'It\'s like a canteloupe, but all green inside.', - accentColor: 0xff206010, + name: 'Tomatoes', + imageAssetPath: 'assets/images/tomato.jpg', + category: VeggieCategory.stealthFruit, + shortDescription: 'A new world food with old world tradition.', + accentColor: Color(0x40ea3628), seasons: [Season.summer], ), Veggie( id: 29, - name: 'Kale', - imageAssetPath: 'assets/images/placeholder.png', - category: VeggieCategory.cruciferous, - shortDescription: 'The meanest vegetable. Does not want to be eaten.', - accentColor: 0xff206010, - seasons: [Season.winter, Season.autumn], + name: 'Watermelon', + imageAssetPath: 'assets/images/watermelon.jpg', + category: VeggieCategory.melon, + shortDescription: 'Everyone\'s favorite closing act at the picnic.', + accentColor: Color(0x40fa8c75), + seasons: [Season.summer], ), Veggie( id: 30, - name: 'Kiwi', - imageAssetPath: 'assets/images/placeholder.png', - category: VeggieCategory.berry, - shortDescription: 'Also known as Chinese gooseberry.', - accentColor: 0xff206010, - seasons: [Season.summer], - ), - Veggie( - id: 31, - name: 'Leeks', - imageAssetPath: 'assets/images/placeholder.png', - category: VeggieCategory.allium, - shortDescription: 'Couldn\'t have vichyssoise without them.', - accentColor: 0xff206010, - seasons: [ - Season.winter, - ], - ), - Veggie( - id: 32, - name: 'Lemons', - imageAssetPath: 'assets/images/placeholder.png', - category: VeggieCategory.citrus, - shortDescription: 'Similar to limes, only yellow.', - accentColor: 0xff206010, - seasons: [ - Season.winter, - ], - ), - Veggie( - id: 33, - name: 'Lettuce', - imageAssetPath: 'assets/images/placeholder.png', - category: VeggieCategory.leafy, - shortDescription: 'Great on a sandwich or as the base for a salad.', - accentColor: 0xff206010, - seasons: [Season.spring, Season.autumn], - ), - Veggie( - id: 34, - name: 'Lima Beans', - imageAssetPath: 'assets/images/placeholder.png', - category: VeggieCategory.legume, - shortDescription: 'Legumes are healthy. We all know this.', - accentColor: 0xff206010, - seasons: [Season.summer], - ), - Veggie( - id: 35, - name: 'Mangos', - imageAssetPath: 'assets/images/placeholder.png', - category: VeggieCategory.tropical, - shortDescription: - 'Bright orange fruit popular with smoothie enthusiasts.', - accentColor: 0xff206010, - seasons: [Season.summer, Season.autumn], - ), - Veggie( - id: 36, - name: 'Mushrooms', - imageAssetPath: 'assets/images/placeholder.png', - category: VeggieCategory.fungus, - shortDescription: - 'They\'re not truffles, but they\'re still pretty good.', - accentColor: 0xff206010, - seasons: [Season.spring, Season.autumn], - ), - Veggie( - id: 37, - name: 'Nectarines', - imageAssetPath: 'assets/images/placeholder.png', - category: VeggieCategory.citrus, - shortDescription: 'A tiny citrus fruit.', - accentColor: 0xff206010, - seasons: [Season.summer], - ), - Veggie( - id: 38, - name: 'Okra', - imageAssetPath: 'assets/images/placeholder.png', - category: VeggieCategory.vegetable, - shortDescription: 'Great in stews and straight-up delicious when fried.', - accentColor: 0xff206010, - seasons: [Season.summer], - ), - Veggie( - id: 39, - name: 'Onions', - imageAssetPath: 'assets/images/placeholder.png', - category: VeggieCategory.allium, - shortDescription: 'Probably best not to eat them all at once.', - accentColor: 0xff206010, - seasons: [Season.winter, Season.spring, Season.autumn], - ), - Veggie( - id: 40, - name: 'Oranges', - imageAssetPath: 'assets/images/placeholder.png', - category: VeggieCategory.citrus, - shortDescription: 'Slice them up and give them to your soccer team.', - accentColor: 0xff206010, - seasons: [ - Season.winter, - ], - ), - Veggie( - id: 41, - name: 'Parsnips', - imageAssetPath: 'assets/images/placeholder.png', - category: VeggieCategory.root, - shortDescription: - 'If a carrot and a potato had a baby, this would be it.', - accentColor: 0xff206010, - seasons: [Season.winter, Season.autumn], - ), - Veggie( - id: 42, - name: 'Peaches', - imageAssetPath: 'assets/images/placeholder.png', - category: VeggieCategory.stoneFruit, - shortDescription: 'Number one fruit for cobbler.', - accentColor: 0xff206010, - seasons: [Season.summer], - ), - Veggie( - id: 43, - name: 'Pears', - imageAssetPath: 'assets/images/placeholder.png', - category: VeggieCategory.fruit, - shortDescription: 'Similar to apples, but gentler and prone to bruising.', - accentColor: 0xff206010, - seasons: [Season.winter, Season.autumn], - ), - Veggie( - id: 44, - name: 'Peas', - imageAssetPath: 'assets/images/placeholder.png', - category: VeggieCategory.legume, - shortDescription: 'Little green spheres of deliciousness.', - accentColor: 0xff206010, - seasons: [Season.spring, Season.autumn], - ), - Veggie( - id: 45, - name: 'Pineapple', - imageAssetPath: 'assets/images/placeholder.png', - category: VeggieCategory.citrus, - shortDescription: 'The porcupine of fruit, it must be handled with care.', - accentColor: 0xff206010, - seasons: [Season.winter, Season.spring, Season.autumn], - ), - Veggie( - id: 46, - name: 'Plums', - imageAssetPath: 'assets/images/placeholder.png', - category: VeggieCategory.stoneFruit, - shortDescription: 'Popular in fruit salads and children\'s tales.', - accentColor: 0xff206010, - seasons: [Season.summer], - ), - Veggie( - id: 47, - name: 'Potatoes', - imageAssetPath: 'assets/images/placeholder.png', - category: VeggieCategory.tuber, - shortDescription: 'King of starches and giver of french fries.', - accentColor: 0xff206010, - seasons: [Season.winter, Season.autumn], - ), - Veggie( - id: 48, - name: 'Pumpkins', - imageAssetPath: 'assets/images/placeholder.png', - category: VeggieCategory.gourd, - shortDescription: 'The largest ever pumpkin weighed 2,624 pounds.', - accentColor: 0xff206010, - seasons: [Season.winter, Season.autumn], - ), - Veggie( - id: 49, - name: 'Radishes', - imageAssetPath: 'assets/images/placeholder.png', - category: VeggieCategory.root, - shortDescription: 'Try roasting them in addition to slicing them up raw.', - accentColor: 0xff206010, - seasons: [Season.spring, Season.autumn], - ), - Veggie( - id: 50, - name: 'Raspberries', - imageAssetPath: 'assets/images/placeholder.png', - category: VeggieCategory.berry, - shortDescription: 'My daughter puts them on her fingertips.', - accentColor: 0xff206010, - seasons: [Season.summer, Season.autumn], - ), - Veggie( - id: 51, - name: 'Rhubarb', - imageAssetPath: 'assets/images/placeholder.png', - category: VeggieCategory.vegetable, - shortDescription: 'Classic pie ingredient when combined with strawberry.', - accentColor: 0xff206010, - seasons: [Season.spring], - ), - Veggie( - id: 52, - name: 'Rutabagas', - imageAssetPath: 'assets/images/placeholder.png', - category: VeggieCategory.root, - shortDescription: 'Can last further into winter than almost anything.', - accentColor: 0xff206010, - seasons: [Season.winter, Season.autumn], - ), - Veggie( - id: 53, - name: 'Spinach', - imageAssetPath: 'assets/images/placeholder.png', - category: VeggieCategory.leafy, - shortDescription: 'Great source of iron and other nutrients.', - accentColor: 0xff206010, - seasons: [Season.spring, Season.autumn], - ), - Veggie( - id: 54, - name: 'Strawberries', - imageAssetPath: 'assets/images/placeholder.png', - category: VeggieCategory.berry, - shortDescription: - 'A delicious fruit that keeps its seeds on the outside.', - accentColor: 0xff206010, - seasons: [Season.spring, Season.summer], - ), - Veggie( - id: 55, - name: 'Summer Squash', - imageAssetPath: 'assets/images/placeholder.png', - category: VeggieCategory.gourd, - shortDescription: 'We call green ones zucchini. Still squash, though.', - accentColor: 0xff206010, - seasons: [Season.summer], - ), - Veggie( - id: 56, - name: 'Sweet Potatoes', - imageAssetPath: 'assets/images/placeholder.png', - category: VeggieCategory.root, - shortDescription: 'Somehow lower in glycemic index than normal potatoes.', - accentColor: 0xff206010, - seasons: [Season.winter, Season.autumn], - ), - Veggie( - id: 57, - name: 'Swiss Chard', - imageAssetPath: 'assets/images/placeholder.png', - category: VeggieCategory.leafy, - shortDescription: 'Chard than enjoys skiing and fine chocolate.', - accentColor: 0xff206010, - seasons: [Season.spring, Season.autumn], - ), - Veggie( - id: 58, - name: 'Tomatillos', - imageAssetPath: 'assets/images/placeholder.png', + name: 'Orange Bell Pepper', + imageAssetPath: 'assets/images/orange_bell_pepper.jpg', category: VeggieCategory.stealthFruit, - shortDescription: - 'The little green tomato things people make salsa from.', - accentColor: 0xff206010, + shortDescription: 'Like green pepper, but nicer.', + accentColor: Color(0x40fd8e00), seasons: [Season.summer], ), - Veggie( - id: 59, - name: 'Tomatoes', - imageAssetPath: 'assets/images/placeholder.png', - category: VeggieCategory.stealthFruit, - shortDescription: 'A new world food with old world tradition.', - accentColor: 0xff206010, - seasons: [Season.summer], - ), - Veggie( - id: 60, - name: 'Turnips', - imageAssetPath: 'assets/images/placeholder.png', - category: VeggieCategory.root, - shortDescription: 'Can be mixed with mashed potatoes for a light side.', - accentColor: 0xff206010, - seasons: [Season.winter, Season.spring, Season.autumn], - ), - Veggie( - id: 61, - name: 'Watermelon', - imageAssetPath: 'assets/images/placeholder.png', - category: VeggieCategory.melon, - shortDescription: 'Everyone\'s favorite closing act at the picnic.', - accentColor: 0xff206010, - seasons: [Season.summer], - ), - Veggie( - id: 62, - name: 'Winter Squash', - imageAssetPath: 'assets/images/placeholder.png', - category: VeggieCategory.gourd, - shortDescription: 'Bigger and heartier than summer squashes.', - accentColor: 0xff206010, - seasons: [Season.winter, Season.autumn], - ), ]; } diff --git a/veggieseasons/lib/data/preferences.dart b/veggieseasons/lib/data/preferences.dart index 453c79081..9f20828e0 100644 --- a/veggieseasons/lib/data/preferences.dart +++ b/veggieseasons/lib/data/preferences.dart @@ -11,60 +11,60 @@ import 'package:shared_preferences/shared_preferences.dart'; /// A model class that mirrors the options in [SettingsScreen] and stores data /// in shared preferences. class Preferences extends Model { - Preferences() { - _loadingFuture = _load(); - } - // Keys to use with shared preferences. static const _caloriesKey = 'calories'; static const _preferredCategoriesKey = 'preferredCategories'; - // Indicates whether a call to [_load] is in progress; - Future _loadingFuture; + // Indicates whether a call to [_loadFromSharedPrefs] is in progress; + Future _loading; int _desiredCalories = 2000; Set _preferredCategories = Set(); Future get desiredCalories async { - await _loadingFuture; + await _loading; return _desiredCalories; } Future> get preferredCategories async { - await _loadingFuture; + await _loading; return Set.from(_preferredCategories); } - void addPreferredCategory(VeggieCategory category) { + void addPreferredCategory(VeggieCategory category) async { _preferredCategories.add(category); - _save(); + await _saveToSharedPrefs(); notifyListeners(); } - void removePreferredCategory(VeggieCategory category) { + void removePreferredCategory(VeggieCategory category) async { _preferredCategories.remove(category); - _save(); + await _saveToSharedPrefs(); notifyListeners(); } - void setDesiredCalories(int calories) { + void setDesiredCalories(int calories) async { _desiredCalories = calories; - _save(); + await _saveToSharedPrefs(); notifyListeners(); } - Future _save() async { + void load() { + _loading = _loadFromSharedPrefs(); + } + + Future _saveToSharedPrefs() async { final prefs = await SharedPreferences.getInstance(); - prefs.setInt(_caloriesKey, _desiredCalories); + await prefs.setInt(_caloriesKey, _desiredCalories); // Store preferred categories as a comma-separated string containing their // indices. - prefs.setString(_preferredCategoriesKey, + await prefs.setString(_preferredCategoriesKey, _preferredCategories.map((c) => c.index.toString()).join(',')); } - Future _load() async { + Future _loadFromSharedPrefs() async { final prefs = await SharedPreferences.getInstance(); _desiredCalories = prefs.getInt(_caloriesKey) ?? 2000; _preferredCategories.clear(); diff --git a/veggieseasons/lib/data/veggie.dart b/veggieseasons/lib/data/veggie.dart index 63efd7b70..b88970123 100644 --- a/veggieseasons/lib/data/veggie.dart +++ b/veggieseasons/lib/data/veggie.dart @@ -2,25 +2,27 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +import 'package:flutter/cupertino.dart'; import 'package:meta/meta.dart'; enum VeggieCategory { - legume, - tuber, + allium, + berry, + citrus, cruciferous, + fern, + flower, + fruit, + fungus, gourd, leafy, - berry, - stealthFruit, - tropical, - fruit, + legume, melon, - stoneFruit, - fern, - citrus, root, - allium, - fungus, + stealthFruit, + stoneFruit, + tropical, + tuber, vegetable, } @@ -31,23 +33,24 @@ enum Season { autumn, } -final Map veggieCategoryNames = { - VeggieCategory.legume: 'Legume', - VeggieCategory.tuber: 'Tuber', +const Map veggieCategoryNames = { + VeggieCategory.allium: 'Allium', + VeggieCategory.berry: 'Berry', + VeggieCategory.citrus: 'Citrus', VeggieCategory.cruciferous: 'Cruciferous', + VeggieCategory.fern: 'Technically a fern', + VeggieCategory.flower: 'Flower', + VeggieCategory.fruit: 'Fruit', + VeggieCategory.fungus: 'Fungus', VeggieCategory.gourd: 'Gourd', VeggieCategory.leafy: 'Leafy', - VeggieCategory.berry: 'Berry', - VeggieCategory.stealthFruit: 'Stealth fruit', - VeggieCategory.tropical: 'Tropical', - VeggieCategory.fruit: 'Fruit', + VeggieCategory.legume: 'Legume', VeggieCategory.melon: 'Melon', - VeggieCategory.stoneFruit: 'Stone fruit', - VeggieCategory.fern: 'Technically fern', - VeggieCategory.citrus: 'Citrus', VeggieCategory.root: 'Root vegetable', - VeggieCategory.allium: 'Allium', - VeggieCategory.fungus: 'Fungus', + VeggieCategory.stealthFruit: 'Stealth fruit', + VeggieCategory.stoneFruit: 'Stone fruit', + VeggieCategory.tropical: 'Tropical', + VeggieCategory.tuber: 'Tuber', VeggieCategory.vegetable: 'Vegetable', }; @@ -77,7 +80,7 @@ class Veggie { /// A color value to use when constructing UI elements to match the image /// found at [imageAssetPath]. - final int accentColor; + final Color accentColor; /// Seasons during which a veggie is harvested. final List seasons; @@ -85,4 +88,6 @@ class Veggie { /// Whether or not the veggie has been saved to the user's garden (i.e. marked /// as a favorite). bool isFavorite; + + String get categoryName => veggieCategoryNames[category]; } diff --git a/veggieseasons/lib/main.dart b/veggieseasons/lib/main.dart index 08f81f21f..aee296d14 100644 --- a/veggieseasons/lib/main.dart +++ b/veggieseasons/lib/main.dart @@ -5,7 +5,8 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/services.dart' show DeviceOrientation, SystemChrome; import 'package:scoped_model/scoped_model.dart'; -import 'package:veggieseasons/data/model.dart'; +import 'package:veggieseasons/data/app_state.dart'; +import 'package:veggieseasons/data/preferences.dart'; import 'package:veggieseasons/screens/home.dart'; import 'package:veggieseasons/styles.dart'; @@ -18,9 +19,12 @@ void main() { runApp( ScopedModel( model: AppState(), - child: CupertinoApp( - color: Styles.appBackground, - home: HomeScreen(), + child: ScopedModel( + model: Preferences()..load(), + child: CupertinoApp( + color: Styles.appBackground, + home: HomeScreen(), + ), ), ), ); diff --git a/veggieseasons/lib/screens/details.dart b/veggieseasons/lib/screens/details.dart index 1d277c97b..112dda4f6 100644 --- a/veggieseasons/lib/screens/details.dart +++ b/veggieseasons/lib/screens/details.dart @@ -5,7 +5,7 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/widgets.dart'; import 'package:scoped_model/scoped_model.dart'; -import 'package:veggieseasons/data/model.dart'; +import 'package:veggieseasons/data/app_state.dart'; import 'package:veggieseasons/data/veggie.dart'; import 'package:veggieseasons/styles.dart'; diff --git a/veggieseasons/lib/screens/favorites.dart b/veggieseasons/lib/screens/favorites.dart index a1a99c78a..55afce8f2 100644 --- a/veggieseasons/lib/screens/favorites.dart +++ b/veggieseasons/lib/screens/favorites.dart @@ -5,7 +5,7 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/widgets.dart'; import 'package:scoped_model/scoped_model.dart'; -import 'package:veggieseasons/data/model.dart'; +import 'package:veggieseasons/data/app_state.dart'; import 'package:veggieseasons/data/veggie.dart'; import 'package:veggieseasons/styles.dart'; import 'package:veggieseasons/widgets/veggie_headline.dart'; diff --git a/veggieseasons/lib/screens/list.dart b/veggieseasons/lib/screens/list.dart index 959caa5e4..e8ace4717 100644 --- a/veggieseasons/lib/screens/list.dart +++ b/veggieseasons/lib/screens/list.dart @@ -6,19 +6,25 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/widgets.dart'; import 'package:intl/intl.dart'; import 'package:scoped_model/scoped_model.dart'; -import 'package:veggieseasons/data/model.dart'; +import 'package:veggieseasons/data/app_state.dart'; +import 'package:veggieseasons/data/preferences.dart'; import 'package:veggieseasons/data/veggie.dart'; import 'package:veggieseasons/styles.dart'; -import 'package:veggieseasons/widgets/veggie_headline.dart'; +import 'package:veggieseasons/widgets/veggie_card.dart'; class ListScreen extends StatelessWidget { - List _generateVeggieRows(List veggies) { + List _generateVeggieRows(List veggies, Preferences prefs) { final cards = new List(); for (Veggie veggie in veggies) { cards.add(Padding( padding: EdgeInsets.only(left: 16.0, right: 16.0, bottom: 24.0), - child: VeggieHeadline(veggie), + child: FutureBuilder>( + future: prefs.preferredCategories, + builder: (context, snapshot) { + final data = snapshot.data ?? Set(); + return VeggieCard(veggie, data.contains(veggie.category)); + }), )); } @@ -29,8 +35,11 @@ class ListScreen extends StatelessWidget { Widget build(BuildContext context) { return CupertinoTabView( builder: (context) { - String dateString = DateFormat.yMMMMd("en_US").format(DateTime.now()); - final model = ScopedModel.of(context, rebuildOnChange: true); + String dateString = DateFormat.jms("en_US").format(DateTime.now()); + final appState = + ScopedModel.of(context, rebuildOnChange: true); + final prefs = + ScopedModel.of(context, rebuildOnChange: true); final rows = []; @@ -47,7 +56,7 @@ class ListScreen extends StatelessWidget { ), ); - rows.addAll(_generateVeggieRows(model.availableVeggies)); + rows.addAll(_generateVeggieRows(appState.availableVeggies, prefs)); rows.add( Padding( @@ -56,7 +65,7 @@ class ListScreen extends StatelessWidget { ), ); - rows.addAll(_generateVeggieRows(model.unavailableVeggies)); + rows.addAll(_generateVeggieRows(appState.unavailableVeggies, prefs)); return DecoratedBox( decoration: BoxDecoration(color: Color(0xffffffff)), diff --git a/veggieseasons/lib/screens/search.dart b/veggieseasons/lib/screens/search.dart index 5860cd65a..4a3c03558 100644 --- a/veggieseasons/lib/screens/search.dart +++ b/veggieseasons/lib/screens/search.dart @@ -5,7 +5,7 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/widgets.dart'; import 'package:scoped_model/scoped_model.dart'; -import 'package:veggieseasons/data/model.dart'; +import 'package:veggieseasons/data/app_state.dart'; import 'package:veggieseasons/data/veggie.dart'; import 'package:veggieseasons/styles.dart'; import 'package:veggieseasons/widgets/search_bar.dart'; diff --git a/veggieseasons/lib/styles.dart b/veggieseasons/lib/styles.dart index f8a04e637..62d36472f 100644 --- a/veggieseasons/lib/styles.dart +++ b/veggieseasons/lib/styles.dart @@ -7,8 +7,6 @@ import 'package:flutter/widgets.dart'; import 'package:veggieseasons/data/veggie.dart'; abstract class Styles { - static String createHeroTag(Veggie veggie) => 'veggie_hero_${veggie.name}'; - static const headlineText = TextStyle( color: Color.fromRGBO(0, 0, 0, 0.8), fontFamily: 'NotoSans', diff --git a/veggieseasons/lib/widgets/veggie_card.dart b/veggieseasons/lib/widgets/veggie_card.dart new file mode 100644 index 000000000..940f505e0 --- /dev/null +++ b/veggieseasons/lib/widgets/veggie_card.dart @@ -0,0 +1,77 @@ +// Copyright 2018 The Flutter team. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +import 'package:flutter/cupertino.dart'; +import 'package:veggieseasons/data/veggie.dart'; +import 'package:veggieseasons/screens/details.dart'; +import 'package:veggieseasons/styles.dart'; + +class VeggieCard extends StatelessWidget { + VeggieCard(this.veggie, this.isPreferredCategory); + + /// Veggie to be displayed by the card. + final Veggie veggie; + + /// Whether [veggie] falls into one of user's preferred [VeggieCategory]s + final bool isPreferredCategory; + + List _buildStackChildren() { + final widgets = []; + + widgets.add(Hero( + tag: veggie.id, + child: Image.asset( + veggie.imageAssetPath, + fit: BoxFit.cover, + ), + )); + + widgets.add(Positioned( + bottom: 0.0, + left: 0.0, + right: 0.0, + child: DecoratedBox( + decoration: BoxDecoration( + color: veggie.accentColor, + ), + child: Padding( + padding: const EdgeInsets.all(16.0), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + veggie.name, + style: Styles.cardTitleText, + ), + Text( + veggie.shortDescription, + style: Styles.cardDescriptionText, + ), + ], + ), + ), + ), + )); + + return widgets; + } + + @override + Widget build(BuildContext context) { + return GestureDetector( + onTap: () { + Navigator.of(context).push(CupertinoPageRoute( + builder: (context) => DetailsScreen(veggie.id), + fullscreenDialog: true, + )); + }, + child: ClipRRect( + borderRadius: BorderRadius.circular(10.0), + child: Stack( + children: _buildStackChildren(), + ), + ), + ); + } +} diff --git a/veggieseasons/pubspec.yaml b/veggieseasons/pubspec.yaml index 001b46ad2..d620b342a 100644 --- a/veggieseasons/pubspec.yaml +++ b/veggieseasons/pubspec.yaml @@ -12,7 +12,7 @@ dependencies: cupertino_icons: ^0.1.2 intl: ^0.15.7 - scoped_model: ^0.3.0 + scoped_model: ^1.0.1 shared_preferences: ^0.4.3 dev_dependencies: @@ -20,18 +20,49 @@ dev_dependencies: sdk: flutter flutter: + assets: - - assets/images/placeholder.png + - assets/images/apple.jpg + - assets/images/artichoke.jpg + - assets/images/asparagus.jpg + - assets/images/avocado.jpg + - assets/images/blackberry.jpg + - assets/images/canteloupe.jpg + - assets/images/cauliflower.jpg + - assets/images/endive.jpg + - assets/images/fig.jpg + - assets/images/grape.jpg + - assets/images/green_bell_pepper.jpg + - assets/images/habanero.jpg + - assets/images/kale.jpg + - assets/images/kiwi.jpg + - assets/images/lemon.jpg + - assets/images/lime.jpg + - assets/images/mango.jpg + - assets/images/mushroom.jpg + - assets/images/nectarine.jpg + - assets/images/persimmon.jpg + - assets/images/plum.jpg + - assets/images/potato.jpg + - assets/images/radicchio.jpg + - assets/images/radish.jpg + - assets/images/squash.jpg + - assets/images/strawberry.jpg + - assets/images/tangelo.jpg + - assets/images/tomato.jpg + - assets/images/watermelon.jpg + - assets/images/orange_bell_pepper.jpg + fonts: - - family: NotoSans - fonts: - - asset: assets/fonts/NotoSans-Regular.ttf - weight: 400 - - asset: assets/fonts/NotoSans-Bold.ttf - weight: 700 - - asset: assets/fonts/NotoSans-BoldItalic.ttf - weight: 700 - style: italic - - asset: assets/fonts/NotoSans-Italic.ttf - style: italic - weight: 400 \ No newline at end of file + - family: NotoSans + fonts: + - asset: assets/fonts/NotoSans-Regular.ttf + weight: 400 + - asset: assets/fonts/NotoSans-Bold.ttf + weight: 700 + - asset: assets/fonts/NotoSans-BoldItalic.ttf + weight: 700 + style: italic + - asset: assets/fonts/NotoSans-Italic.ttf + style: italic + weight: 400