ABSTRACT

This chapter builds upon the previous chapter. In the last chapter, the Google Books API (or Books API) was accessed to fetch books data for the given search query. In this chapter, you will learn to parse HttpResponse fetched from API into JSON format. You'll learn to use Dart's convert library to parse the response into JSON format. This library belongs to Dart language's core packages. You will plan the interface to display book information received from Books API in a listing. Each book's information is displayed in a custom widget BookTile. You will learn to create custom widgets using Card, Padding, Row, Flexible, Column, Text, and Image widgets. Later in this chapter, the JSON formatted response is converted into the BookModel data model. This is done by mapping JSON responses into the data model classes. These Dart objects are used to build book listing Flutter user interface. You will learn to access data models to display book information in the application's list view.