algonauti / flutter-rest-data

Easily persist on device REST data from your backend
Other
5 stars 3 forks source link

Add example app #2

Open algodave opened 4 years ago

algodave commented 4 years ago

The app will read beers' data from the following JSON:API endpoints, available at https://peaceful-hamlet-37069.herokuapp.com/

On the models layer:

Screen 1: Loading beers

start_screen

The app will use a PersistentJsonApiAdapter

After the "Load beers" button is clicked:

Screen 2: Beers list

beers_list_screen

This screen should consume data that are returned by the Beers API index endpoint. Each list item will consume some attributes that are available in the Beer model; choose the ones that you think are most relevant.

When user taps on an individual beer list item, the app navigates to the next screen.

Screen 3: Beer detail

On entering this screen, the whole set of a beer's data should be loaded by invoking the show endpoint. Hint: forceReload optional argument will need to be passed to adapter's find() method in order to prevent it from returning the cached beer record, which won't include ingredients because it was loaded with the index endpoint request.

beer_detail_screen

This screen will consume the whole set of a beer's data, including ingredients. Feel free to arrange them according to their relevance, based on your understanding.