Use [] to find tag! Example: [flutter, javascript]

Dart Basic Programming
Dart Basic Programming

Chapter 14

Data Model

remove_red_eye 2377 Times
spellcheck 115 Words, 676 Characters

In dart, a data object is made/composed of a class. You could say that this session is one of the child sessions of the chapter object oriented programming 


JSON is a request/response model that is currently very trendy. Therefore, let's try to learn how to create a dart object from JSON.


Following is sample code for modeling from json data to an object in dart.


From the code example above, the datajson variable is a json which will be converted into a dart object. Teacher is an object dart that we can provide contents using json data, why is that? because Teacher object/class has a factory method that can change a json data into its own Object attribute.

Content Navigation