Build the job-ready capability of consuming REST APIs inside a Flutter app. You will make GET, POST, PUT and DELETE calls with the http and dio packages, parse JSON into typed Dart model classes, render results with FutureBuilder, and handle loading, errors, auth tokens and timeouts like a professional.
Watch the free preview
Your first GET request with the http package — free to watch, no account needed.
What you'll learn
- Consume REST APIs in a Flutter app using the http and dio packages
- Perform GET, POST, PUT and DELETE requests and read status codes correctly
- Parse JSON into typed Dart model classes with fromJson and toJson
- Render asynchronous data with FutureBuilder, handling loading and error states
- Send auth headers and handle timeouts, retries and cancellation robustly
Syllabus
Talking to a Server — GET and JSON
Your first GET request with the http packageFree preview
Parsing JSON into typed model classes
Showing Data and Changing It
Rendering async data with FutureBuilder
Writing data — POST, PUT and DELETE
Headers, Auth and the dio Package
Headers and auth tokens
The dio package — interceptors and configuration
Robust Networking in Production
Timeouts, retries and cancellation
Error architecture — a Result type and a repository
Lab — 10 Exercises & Solutions
Exercises 1–5
Exercises 6–10