Make authenticated requests

Send data to the internet

Parse JSON in the background

Cookbook

Networking

Parse JSON in the background

1. Add the http package

2. Make a network request

3. Parse and convert the JSON into a list of photos

Create a Photo class
Convert the response into a list of photos

4. Move this work to a separate isolate

Notes on working with isolates

Complete example

By default, Dart apps do all of their work on a single thread.
In many cases, this model simplifies coding and is fast enough
that it does not result in poor app performance or stuttering animations,
often called “jank.”

However, you might need to perform an expensive computation,
such as parsing a very large JSON document.
If this work takes more than 16 milliseconds,
your users experience jank.