I have just started the flutter journey. I have been asked to develop a mobile app that uses the data of a website instead of its own database(firestore etc.). The website is about car dealing business. It has data about cars and I want to fetch that data into flutter app
I have no idea how to do it. Is there any package
or anything else.
Asked
Active
Viewed 194 times
0

OneCricketeer
- 179,855
- 19
- 132
- 245

Student
- 341
- 1
- 2
- 12
-
Data of a website mean? ...You can consume data if API's are available or if not you have to go with data scrapping. – Vinamra Jaiswal Jan 24 '22 at 16:32
3 Answers
2
You would combine an HTTP Client with an HTML parser, assuming the website itself didn't have a accessible API that readily returns the data you're interested in via JSON.

OneCricketeer
- 179,855
- 19
- 132
- 245
2
First you have to build the REST Full API in the website backend using a backend language PHP or Node.js or .Net whatever good for your project, and then use flutter Dio or http to make requests to the REST API you built, you get back a JSON response then populate the data on your flutter app

Ridha Rezzag
- 3,672
- 1
- 34
- 39
-
-
In this example, you will learn how to get the data from a database and return it as a json https://www.youtube.com/watch?v=pqEONSbXeSQ – Ridha Rezzag Jan 25 '22 at 18:54
-
And in this example you will learn how to call that API you built and use the response to populate the data in your flutter app https://www.youtube.com/watch?v=MEqUx3_KrFo – Ridha Rezzag Jan 25 '22 at 18:56