In my first project in Flutter I spend more time on writing Model class to bind with api. I tried json_serializable plugin first but doesn’t felt comfortable with it. So I made a php JSON Model generator with the required Parsing function.
You can access it here http://sab99r.com/flutter-json-serialization-model-generator/
To generate A model enter the Model Class Name and the required variables. Then hit generate button. thats it.
It will generate the Model class with
- fromJson(Map<String,dynamic> parsedJson)
- listFromJson(List<dynamic> list)
- listFromString(String responseBody)