BasicModel.fromJson constructor
Generate the class based on a Map (JSON)
.
Implementation
@mustCallSuper
BasicModel.fromJson(dynamic json) {
if (json == null) {
_originalMap = {};
} else if (json is String) {
_originalMap = jsonDecode(json);
} else {
_originalMap = Map.from(json);
}
updateValues(_originalMap);
}