diff --git a/veggieseasons/README.md b/veggieseasons/README.md index 2794ccacb..c995d6c2e 100644 --- a/veggieseasons/README.md +++ b/veggieseasons/README.md @@ -23,7 +23,10 @@ as the user navigates. ### `/widgets/search_bar.dart` -An example of how to construct an Cupertino-style search bar. +An example of how to construct an Cupertino-style search bar. The +Flutter team [is working on an official widget](https://github.com/flutter/flutter/issues/9784) +for this. Once that effort is complete, developers will not need to roll +their own search bars, so to speak. ## Questions/issues diff --git a/veggieseasons/lib/data/veggie.dart b/veggieseasons/lib/data/veggie.dart index 1deeb8263..63efd7b70 100644 --- a/veggieseasons/lib/data/veggie.dart +++ b/veggieseasons/lib/data/veggie.dart @@ -58,17 +58,31 @@ class Veggie { @required this.imageAssetPath, @required this.category, @required this.shortDescription, - @required this.darkVibrantColor, + @required this.accentColor, @required this.seasons, this.isFavorite = false, }); final int id; + final String name; + + /// Each veggie has an associated image asset that's used as a background + /// image and icon. final String imageAssetPath; + final VeggieCategory category; + final String shortDescription; - final int darkVibrantColor; + + /// A color value to use when constructing UI elements to match the image + /// found at [imageAssetPath]. + final int accentColor; + + /// Seasons during which a veggie is harvested. final List seasons; + + /// Whether or not the veggie has been saved to the user's garden (i.e. marked + /// as a favorite). bool isFavorite; } diff --git a/veggieseasons/lib/main.dart b/veggieseasons/lib/main.dart index f006ede5e..27650ec47 100644 --- a/veggieseasons/lib/main.dart +++ b/veggieseasons/lib/main.dart @@ -12,15 +12,11 @@ void main() { DeviceOrientation.portraitUp, DeviceOrientation.portraitDown, ]); - runApp(new MyApp()); -} -class MyApp extends StatelessWidget { - @override - Widget build(BuildContext context) { - return CupertinoApp( + runApp( + CupertinoApp( color: Styles.appBackground, home: HomeScreen(), - ); - } + ), + ); }