RemoteObject.fromJson constructor
RemoteObject.fromJson(
- Map<String, dynamic> json
)
Implementation
factory RemoteObject.fromJson(Map<String, dynamic> json) {
return RemoteObject(
type: RemoteObjectType.fromJson(json['type'] as String),
subtype:
json.containsKey('subtype')
? RemoteObjectSubtype.fromJson(json['subtype'] as String)
: null,
className:
json.containsKey('className') ? json['className'] as String : null,
value: json.containsKey('value') ? json['value'] as dynamic : null,
unserializableValue:
json.containsKey('unserializableValue')
? UnserializableValue.fromJson(
json['unserializableValue'] as String,
)
: null,
description:
json.containsKey('description')
? json['description'] as String
: null,
deepSerializedValue:
json.containsKey('deepSerializedValue')
? DeepSerializedValue.fromJson(
json['deepSerializedValue'] as Map<String, dynamic>,
)
: null,
objectId:
json.containsKey('objectId')
? RemoteObjectId.fromJson(json['objectId'] as String)
: null,
preview:
json.containsKey('preview')
? ObjectPreview.fromJson(json['preview'] as Map<String, dynamic>)
: null,
customPreview:
json.containsKey('customPreview')
? CustomPreview.fromJson(
json['customPreview'] as Map<String, dynamic>,
)
: null,
);
}