ModelSource.fromJson constructor

ModelSource.fromJson(
  1. Map<String, dynamic> data
)

Returns a ModelSource type from a JSON

Implementation

factory ModelSource.fromJson(Map<String, dynamic> data) {
  var self = ModelSource._();
  self._map["type"] = data['type'];
  self._map["name"] =
      data['name'] ?? {throw ArgumentError('name should not be null')};
  return self;
}