0

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.

OneCricketeer
  • 179,855
  • 19
  • 132
  • 245
Student
  • 341
  • 1
  • 2
  • 12

3 Answers3

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

If your website has a firebase backend, then you can use this set of plugins. The google-services.json file should be the same as that of the firebase project used in your website.

If your website has an API you can use the http package to make http requests.

SuPythony
  • 875
  • 8
  • 23
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
  • Is there any youtube tutorial. Thank you for responding. – Student Jan 25 '22 at 18:13
  • 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