首页 > 解决方案 > Flutter Share.sharefiles() 没有那个文件或目录,null,null,null

问题描述

我想分享我的应用程序中的图像以及描述。但是,当我使用Share.shareFiles([widget.post.imageUrl], text: widget.post.description);它时,它给了我错误

PlatformException (PlatformException(http:baseUrl/media/posts/image_cropper_1616070403137.jpg 
(No such file or directory), null, null, null))

我尝试过其他软件包,例如 image_share、内容共享。它一直给我同样的错误。如果图像位于资产目录中,则所有其他类似的 StackOverflow 问题都会涵盖这一点。但就我而言,我通过 API 获取图像。

如果您知道如何修复它,请告诉我。

标签: fluttershare

解决方案


推荐阅读