I want to convert it to a list of models like below, how do I do that?
I am a newbie please give me the solution.
Thank you!
Asked
Active
Viewed 211 times
-1

An Tran
- 119
- 9
-
You can generate them from YAML data instead of writing them by hand. https://stackoverflow.com/questions/51053954/how-to-deserialize-a-list-of-objects-from-json-in-flutter/66464998#66464998 – mezoni Jul 24 '22 at 14:31
1 Answers
0
In order to parse the json data you need to create a model class based on the JSON data structure. flutter docs has a good documentation on how to create a model class. for convenience you can use this online generator to create your own json model easily, this site or this

Denver Shenal
- 311
- 2
- 9