Adding Comic Selection by Number

It’s very easy to fetch comics by number, so it seems obvious that we should be able to let the user select comics using the comic number, especially because very often users want to go back to a comic they’ve seen on the Web.

To do that, we’ll start by creating a page to select the comics, which will look like this:

images/Networking/select.png

Since it doesn’t need any parameters to work, we don’t need to specify the constructor, but we need to have a fetchComic method that fetches by comic number, unlike the one we used for the HomePage:

 class​ SelectionPage ​extends​ StatelessWidget {
  Future<Map<​String​, ​dynamic​>> _fetchComic(​ ...

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.