Build the App’s Basic UI

We’ll build an app that is going to display a ListView of ListTiles. There will be a tile for each comic and tapping on a tile should display the details of that comic.

The home is going to look like the screenshot.

images/Networking/home1.png

Let’s start by defining the classes we need for this app:

  • A class for the home screen.
  • A custom ComicTile class to make creating ListTiles for the comics easier.
  • A class for the comic page.

For a change, we won’t be using an app class; the main method will pass the needed data directly to the HomeScreen class we’re going to create:

 void​ ​main​() async =>
  runApp(

Get Programming Flutter now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.