fromJson static method
Returns a new NewServiceModel instance and imports its values from
value
if it's a Map, null otherwise.
Implementation
// ignore: prefer_constructors_over_static_methods
static NewServiceModel? fromJson(dynamic value) {
if (value is Map) {
final json = value.cast<String, dynamic>();
return NewServiceModel(
name: mapValueOfType<String>(json, r'name'),
image: mapValueOfType<String>(json, r'image'),
value: mapValueOfType<double>(json, r'value'),
shared: mapValueOfType<bool>(json, r'shared'),
);
}
return null;
}