Module 09 of 12

Networking & APIs

Lessons

About This Module

Most apps need data that lives on a server: a feed of posts, a list of products, a user profile. Flutter gets that data over HTTP, and because a network call takes time it is always asynchronous. You send a request, wait for a response, and update the UI when it arrives.

This module starts with the http package, making a GET request and turning the JSON response into Dart model objects you can show on screen. It then covers a full REST API workflow with GET, POST, PUT and DELETE, and shows how JSON serialization with json_serializable replaces hand-written parsing code. The last lesson introduces Dio, a more capable HTTP client that adds features such as interceptors and better error handling.

Watch the lessons in order, then continue on to Local Storage & Firebase.

Lessons

4 videos
01

Flutter Fetch API & JSON Tutorial

Makes an HTTP GET request with the http package, parses the JSON into Dart models and displays the data in the UI.

02

Flutter Tutorial - HTTP Requests and REST API (GET, POST, PUT and DELETE)

Builds an app that uses the http package to load JSON from a REST API and to create, update and delete data.

03

Flutter Tutorial - Convert JSON To Dart & Object To JSON [2021] JSON Serializable

Uses the json_serializable package to convert JSON into Dart objects and back, instead of writing parsing code by hand.

04

Dio in Flutter: Complete REST API Tutorial

Uses the Dio package to integrate a REST API and make real-world API calls in a Flutter app.