我正在使用图像.当uri是一个空字符串时,它在android上工作得很好,但在ios中不工作



在这里输入图像描述源。Uri不应该是空字符串

await Image.getSize(
uri && uri,
async (width, height) => {
//success
//image still exist in the galory
exist = true;
},
(error) => {
num_messing_files++;
// Failed
// image do no exist any more in the galory [ what does exactly X represent]
}
);

您可以在调用getSize之前检查uri是否为空字符串,而不是在内部执行。

if(uri){
await Image.getSize(...)
}

最新更新