RenameOptions.fromJson constructor
RenameOptions.fromJson(})
Implementation
factory RenameOptions.fromJson(
JsonDecoder jsonDecoder,
String jsonPath,
Object? json, {
ClientUriConverter? clientUriConverter,
}) {
json ??= {};
if (json is! Map) {
throw jsonDecoder.mismatch(jsonPath, "'rename options'", json);
}
String newName;
if (json case {'newName': var encodedNewName}) {
newName = jsonDecoder.decodeString('$jsonPath.newName', encodedNewName);
} else {
throw jsonDecoder.mismatch(jsonPath, "'newName'", json);
}
return RenameOptions(newName);
}