fromJson abstract method
Populated state of AtCollectionModel from its JSON representation. class that extends AtCollectionModel has to override this method to populate object's state.
e.g We have a class that extends AtCollectionModel and has name and description as it's member.
For such a class toJson would look like:
@override
fromJson(String jsonObject) {
this.name = jsonObject['name'];
this.description = jsonObject['description'];
}
fromJson will be internally used by getById
, getAll
methods
Implementation
fromJson(Map<String, dynamic> jsonObject);