我正在Flutter应用程序之一中使用flutter image_picker_saver插件。在iOS 13以下的版本中,它的工作正常。在iOS 13中,出现错误。请告知
代码:
final byteData = await image.toByteData(format: ImageByteFormat.png);
Uint8List pngBytes = byteData.buffer.asUint8List();
var filePath = await ImagePickerSaver.saveFile(fileData: pngBytes);
print(filePath);
Flutter版本:Flutter 1.9.1 + hotfix.2•通道稳定• https://github.com/flutter/flutter.git框架•版本2d2a1ffec9 (3周前)•2019-09-06 18:39:49 -0700引擎•版本b863200c37 工具•Dart 2.5.0
Flutter Doctor:医生摘要(要查看所有详细信息,请运行Flutter Doctor -v):[✓] Flutter(频道稳定,v1.9.1 + hotfix.2,在Mac OS X 10.14.6 18G95上,语言环境为美国)
[✓] Android工具链-为Android设备开发(Android SDK 版本29.0.1)[✓] Xcode-为iOS和macOS开发(Xcode 11.0)[✓] Android Studio(版本3.4)[✓] VS代码(版本1.38.1)[✓] 已连接的设备(1个可用)
•找不到问题!
Xcode日志:unner [32641:729850]保存图像成功2019-09-26 09:37:58.007237 + 0300 Runner [32641:729850] [核心]“错误从 守护程序:错误Domain = com.apple.accounts代码= 7“(null)”“ 2019-09-26 09:37:58.041160 + 0300 Runner [32641:729723] Success public.png { PHImageFileDataKey = {长度= 1715209,字节= 0x89504e47 0d0a1a0a 0000000d 49484452 ... 49454e44 ae426082}; PHImageFileOrientationKey = 0; PHImageFileUTIKey =“ public.png”; PHImageResultIsDegradedKey = 0; PHImageResultRequestIDKey = 1; } 2019-09-26 09:37:58.041279 + 0300 Runner [32641:729723]成功PHImageFileURLKey(空)2019-09-26 09:37:58.044804 + 0300 Runner [32641:729862] [VERBOSE-2:ui_dart_state.cc(148)]未处理的异常:无效 论点
0 _StringBase。+(dart:core-patch / string_patch.dart:263:57)
1个ImagePickerSaver.saveFile(程序包:image_picker_saver / image_picker_saver.dart:85:34)
答案 0 :(得分:0)
使用最新版本更新image_picker_saver插件后,它可以正常工作。感谢您的支持。 :) –