EditIsPostfixCompletionApplicableParams.fromJson constructor
EditIsPostfixCompletionApplicableParams.fromJson()
Implementation
factory EditIsPostfixCompletionApplicableParams.fromJson(
JsonDecoder jsonDecoder, String jsonPath, Object? json) {
json ??= {};
if (json is Map) {
String file;
if (json.containsKey('file')) {
file = jsonDecoder.decodeString('$jsonPath.file', json['file']);
} else {
throw jsonDecoder.mismatch(jsonPath, 'file');
}
String key;
if (json.containsKey('key')) {
key = jsonDecoder.decodeString('$jsonPath.key', json['key']);
} else {
throw jsonDecoder.mismatch(jsonPath, 'key');
}
int offset;
if (json.containsKey('offset')) {
offset = jsonDecoder.decodeInt('$jsonPath.offset', json['offset']);
} else {
throw jsonDecoder.mismatch(jsonPath, 'offset');
}
return EditIsPostfixCompletionApplicableParams(file, key, offset);
} else {
throw jsonDecoder.mismatch(
jsonPath, 'edit.isPostfixCompletionApplicable params', json);
}
}