将照相机图片保存到摇摆的相机卷
final testDir =
await Directory('${extDir.path}/test').create(recursive: true);
final String filePath = '${testDir.path}/${DateTime.now().millisecondsSinceEpoch}.jpg';
await pictureController.takePicture(filePath);
final file = File(filePath);
print("==> hastakePhoto : ${file.exists()} | path : $filePath");
final img = imgUtils.decodeImage(file.readAsBytesSync());
print("==> img.width : ${img?.width} | img.height : ${img?.height}");
print("----------------------------------");```
I am using Camerawesome package to take a picture, image were successfully taken but it isnt saved in the device. Any ideas please? All permissions were granted
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您的问题有多种解决方案。
第一个方法:
您可以使用许多可用软件包之一:
这将是Gallery Saver的示例集成 https://pub.dev/packages/packages/gallery_saver
>第二种方法:
使用路径提供商
There are multiple Solutions to your problem.
First method:
You can use one of the many available packages:
This would be an example integration for gallery saver https://pub.dev/packages/gallery_saver
Second Method:
Using Path Provider https://pub.dev/documentation/path_provider/latest/path_provider/getApplicationDocumentsDirectory.html