ABSTRACT

This chapter introduces fetching data from a remote REST API. You will learn what a REST API means and why it's essential to know to consume one from a Flutter app. You will learn to access and use Google Books API to fetch books data. An API key using Google Cloud is created to access Google's Books API. You will learn how to connect to an API and fetch responses over HTTP in JSON representation. By the end of this chapter, you will have a good understanding of getting your own API key from Google API Console and use this API key to make a REST call to fetch book listings. Once you are all set with credentials, you will learn to use the raw JSON response returned from API to create a simple user interface in Flutter. You will deploy the same user interface on Android, iOS, web, and desktop platforms from the single codebase.