- http package to make the request.
- dart:convert to process the response from server.
So now let’s make an App that will make API request to get the List of ToDo’s.
And then we will display the first ToDo.
Let’s get into the steps:
Create a ListTile , that will show our ToDo and a button which will make API request.
Create a method ,which will make API request.
Now, we have to process the response, so we can use it easily.
Update the UI with received data.
At last, add functionality to the Raised Button
The URL i have used above provides dummy API’s for trial
Also don’t forget to mention the http package in the pubspec.yaml file.