AddContentOverlay.fromJson constructor
AddContentOverlay.fromJson(})
Implementation
factory AddContentOverlay.fromJson(
JsonDecoder jsonDecoder, String jsonPath, Object? json,
{ClientUriConverter? clientUriConverter}) {
json ??= {};
if (json is Map) {
if (json['type'] != 'add') {
throw jsonDecoder.mismatch(jsonPath, 'equal add', json);
}
String content;
if (json.containsKey('content')) {
content =
jsonDecoder.decodeString('$jsonPath.content', json['content']);
} else {
throw jsonDecoder.mismatch(jsonPath, 'content');
}
return AddContentOverlay(content);
} else {
throw jsonDecoder.mismatch(jsonPath, 'AddContentOverlay', json);
}
}