skip to Main Content

I am new to flutter/Dart and I want to get data from an API. I don’t know how to get the JSON schema from the API. I don’t find it in the documentation.

This is the API I want to connect to. https://rapidapi.com/realtymole/api/realty-mole-property-api

I have written code from an example using this JSON: https://jsonplaceholder.typicode.com/posts
but this site already has the json available so I can convert the json to dart.

How do I use this API in my flutter project?

Any help would be appreciated

2

Answers


  1. You can use the Quicktype service to generate the required Dart models out of the example JSON responses of different endpoints provided in the API documentation.

    Login or Signup to reply.
  2. You can use these packages to connect with API and get response.

    And after getting your JSON response use can use Quicktype to convert JSON into dart model. Hope it helps.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search