简体   繁体   中英

want to get actual path of image or video while using file picker or image picker in flutter?

我想在我的 Flutter 应用程序中导入图像或视频,然后想在导入我的 Flutter 应用程序后从图库中删除或原始文件我现在面临的问题我正在使用图像选择器和文件选择器包,它们为我提供临时或图像的缓存路径不是原始图像,因此无法删除原始图像。

After 24 hr of R&D finally i found a solution of it https://pub.dev/packages/photo_manager this is a package name photo_manager you can use this package and use this code :

final List result = await PhotoManager.editor.deleteWithIds([entity.id]); // The deleted id will be returned, if it fails, an empty array will be returned.

to delete images and video from your device gallery folder.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM