Activity Finder | Progressive Web App, Android, Bored API

A simple app. The steps of the article of http from the Flutter cookbook is followed.

Functionalities

  • Retrieving random activities from Bored API

Documentation

The steps of the article of http from the Flutter cookbook is followed.

main.dart

A FutureBuilder is used to display the data.

On click on the FloatingActionButton the state is set to re-render the FutureBuilder again (since setting state runs the build function again).

api/activities.dart

A Future is used for the API call. The response is parsed into the SingleActivity class.

single_activity.dart

A SingleActivity custom class takes the response from the Bored API and sorts the data from the received JSON.