While the http package doesn’t have every feature found in OkHttp,
it abstracts away much of the networking that you would normally implement
yourself, making it a simple way to make network calls.

To use the http package, add it to your dependencies in pubspec.yaml:

dependencies

...

http

^0.11.3+16

To make a network call, call await on the async function http.get():

How do I show the progress for a long-running task?

In Android you would typically show a ProgressBar view in your UI while
executing a long running task on a background thread.

In Flutter, use a ProgressIndicator widget.
Show the progress programmatically by controlling when it’s rendered
through a boolean flag. Tell Flutter to update its state before your
long-running task starts, and hide it after it ends.