getRecipes(): Returns the list of recipes.Internally, it makes a batch request and returns two lists: recipes to explore and friend posts. getExploreData(): Returns ExploreData.In this chapter, you’ll use two API calls: It has async functions that wait to load data from a sample JSON and decode it to recipe model objects. MockFooderlichService is a service class that mocks a server response. The api folder contains a mock service class.įooderlichService FooderlichAPI MockFooderlichService In the lib directory, you’ll also notice three new folders, as shown below: sample_recipes.json: A list of recipes including details about the duration and cooking difficulty of each.sample_friends_feed.json: This list contains samples of your friends’ posts, in case you’re curious about what your friends are cooking up! □□.Sometimes, users might want recommendations for what to cook today! sample_explore_recipes.json: A list of recipes to display on the home screen.The sample_data directory contains three JSON files: profile_pics: Contains team member pictures.magazine_pics: All the food magazine background images you’ll display on card widgets.food_pics: Contains the food pictures you’ll display throughout the app.The assets directory contains all JSON files and images that you’ll use to build your app. Before you learn how to create scrollable widgets, take a look at them. There are new files in this starter project to help you out. You’ll see colored screens as shown below: Open the starter project in Android Studio, then run flutter pub get if necessary and run the app. :]īy the end of this chapter, you’ll be a scrollable widget wizard! Getting started The second displays a library of recipes, handy if you’re still on the fence about what to cook today. The first shows popular recipes for the day along with what your friends are cooking. You’ll continue to build your recipe app, Fooderlich, by adding two new screens: Explore and Recipes. In this chapter, you’ll learn everything you need to know about scrollable widgets. There’s only so much information a user can process at a time, let alone fit on an entire screen in the palm of your hand! Section IV: Networking, Persistence and State Section 4: 7 chapters Show chapters Hide chaptersīuilding scrollable content is an essential part of UI development. Section III: Navigating Between Screens Section 3: 2 chapters Show chapters Hide chaptersħ.5 Navigation and unidirectional data flowħ.6 Is Navigator 2.0 always better than Navigator 1.0?ħ.16 Transitioning from Login to Onboarding screenħ.17 Transitioning from Onboarding to Homeħ.23 Handling the Android system’s Back buttonĨ.8 Connecting the parser to the app router Section II: Everything’s a Widget Section 2: 4 chapters Show chapters Hide chaptersĥ.7 Creating the ListView for friends’ postsĥ.8 Adding final touches to the Explore screenĦ.9 Creating the screen to add grocery items
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |