Almost every app in existence needs to access data from the internet in some capacity. One of the most common ways to consume data online is with REST APIs. This video will show you how easy it is add, create, update, and delete data from a backend source with an easy networking library in Flutter called Dio.
00:00 - Intro
00:35 - Talking about the general structure of the app to finish building
1:34 - Walking through the initial code (link below)
6:00 - Configuring the Dio client with a base url API key, and interceptors
15:38 - Creating the API/REST interface file
21:53 - Creating the Repository layer which decides where data should be coming from
25:35 - Creating functions to map a json object to a model and vice versa
29:05 - Finishing the Repository layer
36:30 - Adding the Repository to the the state controller (use whatever state library you want to)
37:40 - Fetching all items in main.dart to ensure we only fetch all the items once
38:37 - Finishing the state controller functions so the UI reflects successful API responses
42:43 - *tip for situations where you want to use a class that exists in multiple pkgs
49:10 - Fixing a silly mistake that you might make when using Dio
51:01 - Updating the list state data when the list has been retrieved from the backend
52:42 - Adding a new item to the backend (and the UI)
55:45 - Deleting an item from the backend (and the UI)
57:12 - Updating an existing item in the backend (and the UI)
1:03:53 - Final Testing
💻Follow along here with the initial code: https://github.com/cheetahcoding/Flutter-Tutorials/tree/dio_REST_tutorial_initial
👕 T-shirts for programmers: https://bit.ly/3ir3Gci
Subscribe: https://www.youtube.com/c/CheetahCoding/featured
#flutter