PropertyPreview.fromJson constructor
PropertyPreview.fromJson(
- Map<String, dynamic> json
)
Implementation
factory PropertyPreview.fromJson(Map<String, dynamic> json) {
return PropertyPreview(
name: json['name'] as String,
type: PropertyPreviewType.fromJson(json['type'] as String),
value: json.containsKey('value') ? json['value'] as String : null,
valuePreview: json.containsKey('valuePreview')
? ObjectPreview.fromJson(json['valuePreview'] as Map<String, dynamic>)
: null,
subtype: json.containsKey('subtype')
? PropertyPreviewSubtype.fromJson(json['subtype'] as String)
: null,
);
}