This course was created with the
course builder. Create your online course today.
Start now
Create your course
with
Autoplay
Autocomplete
Previous Lesson
Complete and Continue
Flutter REST API Crash Course
Intro to REST, the nCoV 2019 REST API, and REST Client
RESTful APIs: The Basics (3:24)
The nCoV 2019 Coronavirus API: Setup instructions, API Keys and Access Tokens (4:51)
REST Client for VS Code: Initial setup & sending requests (5:10)
REST Client: Using Environment Variables and excluding sensitive data with .gitignore (4:28)
REST Client: Adding the remaining requests (4:25)
Building an API Service with the Dart http package
App Architecture Overview (2:48)
Installing the http package (1:14)
Saving the API key + GitHub source code + the Error Lens extension (2:37)
The API class (3:32)
The APIService class: requesting an access token (4:04)
Parsing the http response and retrieving the access token (2:47)
Using the API Service to show the access token (3:14)
Adding the remaining endpoints to the API class (2:01)
Requesting and parsing data from the remaining endpoints (5:21)
Using the APIService class to show endpoint data (3:51)
Recap on the APIService class (2:19)
Building a Data Repository and creating the basic UI
The Data Repository (2:44)
Loading and refreshing the access token when needed (2:50)
Adding a Provider for the DataRepository (2:58)
Creating a basic dashboard UI (3:47)
Creating a custom card widget to show endpoint data (4:01)
Loading the initial endpoint data from the API (2:28)
Adding a refresh indicator (2:25)
Loading data from multiple endpoints and polishing the UI
Loading data from multiple endpoints with Future.wait (2:44)
The EndpointsData class (2:19)
Improving the DataRepository class with generics and function arguments (4:20)
Showing all the cards (2:56)
Adding the icon assets to the project (1:38)
Updating the cards layout, image and color (6:17)
Date formatting and reading the last updated date from the server
Showing when the data was last updated: client vs server approach (1:10)
Parsing date information from the API response data (1:59)
Creating a new data model to hold the date and value from the API (3:19)
Showing the last updated date in the UI (2:30)
Formatting dates with the "intl" package (5:08)
Add thousands' separators with the NumberFormat class (2:14)
Error handling & caching data with Shared Preferences
Error handling overview, and understanding the call stack (6:17)
Showing an alert dialog to the user (5:21)
Completing the error handling code (3:19)
Introduction to data persistence with Shared Preferences (1:46)
Writing a DataCacheService (8:32)
Integrating the DataCacheService in the DataRepository (3:14)
Injecting the DataCacheService in main.dart (4:15)
Hot fix: The getter 'date' was called on null (5:08)
Conclusion & next steps (1:49)
REST Client: Using Environment Variables and excluding sensitive data with .gitignore
Useful links & resources:
REST Client extension for Visual Studio Code
Download
01.04-REST-client-environment-variables.zip
Complete and Continue
Discussion
10
comments
Load more
10 comments