hui-z / image_gallery_saver

flutter中用于保存图片到相册的Plugin

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Saving the image has no result,no exception occurred

yang-junhua opened this issue · comments

I saved many pictures to the album, and the pictures were saved successfully. However, there were no results returned during the saving process, and no exceptions occurred. I could not obtain the saving progress to prompt the user

I have the same issue on iOS. It works just fine on Android :/

Are you saving the files in parallel ?
I did this for it to work:

if (io.Platform.isAndroid) {
  await Future.wait(xFiles.map((file) => ImageGallerySaver.saveFile(file.path)));
} else {
  ///iOS doesn't support saving multiple files at once
  for (var i = 0; i < xFiles.length; i++) {
    await ImageGallerySaver.saveFile(xFiles[i].path);
  }
}