MoveFileOptions.fromJson constructor
MoveFileOptions.fromJson(})
Implementation
factory MoveFileOptions.fromJson(
JsonDecoder jsonDecoder,
String jsonPath,
Object? json, {
ClientUriConverter? clientUriConverter,
}) {
json ??= {};
if (json is Map) {
String newFile;
if (json.containsKey('newFile')) {
newFile =
clientUriConverter?.fromClientFilePath(
jsonDecoder.decodeString('$jsonPath.newFile', json['newFile']),
) ??
jsonDecoder.decodeString('$jsonPath.newFile', json['newFile']);
} else {
throw jsonDecoder.mismatch(jsonPath, "'newFile'", json);
}
return MoveFileOptions(newFile);
} else {
throw jsonDecoder.mismatch(jsonPath, "'moveFile options'", json);
}
}