How to use JSON data dynamically from API in a DataTable

Widgets & Design

Hi Flutterflow Community,

I’m trying to dynamically display a DataTable with data from an API as soon as the JSON response is received. The data structure is simple, and the API returns something like this:

{
"protein": 13,
"calories": 355,
"fats": 1.9,
"name": "pasta",
"carbohydrates": 70
}

However, I’m getting this error: "Data Table rows must be generated dynamically."

Capture d’écran du 2024-10-04 16-04-45.png
38.02KB

What have you tried so far?
  • Tried to use DataTypes with the correct data schema but still the same error

  • Tried to use app state with the DataType but still the same error

Did you check FlutterFlow's Documentation for this topic?
Yes