'Problem accessing specific field dynamically

So kost of you just be know about mealDB, and i have problem accessing one of it's data for GridView.builder, named stringredient inside the detail of food.

Usually i access this kind of data using

Text("${data.meals[0].stringredient[index]")

But because it have it's own field rather than inside of list

stringredient, stringredient2, etc

I don't know how to access it dynamically for builder

Is there a way to make it work?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source