Convert the response body into a JSON Map with the
dart:convert package.

If the server returns an UPDATED response with a status
code of 200, then convert the JSON Map into an Album
using the fromJson() factory method.

If the server doesn’t return an UPDATED response with a
status code of 200, then throw an exception.
(Even in the case of a “404 Not Found” server response,
throw an exception. Do not return null.
This is important when examining
the data in snapshot, as shown below.)

Hooray!
Now you’ve got a function that updates the title of an album.

4. Get the data from the internet

Get the data from internet before you can update it.
For a complete example, see the Fetch data recipe.

Ideally, you will use this method to set
_futureAlbum during initState to fetch
the data from the internet.