Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/swift/16.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
将图像传递到iOS的颤振_Ios_Swift_Flutter - Fatal编程技术网

将图像传递到iOS的颤振

将图像传递到iOS的颤振,ios,swift,flutter,Ios,Swift,Flutter,我在flatter中生成一个图像,图像以字节为单位(定义为imageInMemory,它是一个UInt8列表)。然后我将字节传递给应用程序 UInt8List imageInMemory var argMap = <String, dynamic>{ "image" : imageInMemory, }; await platform.invokeMethod("passToNative", argMap); uint8在内存

我在flatter中生成一个图像,图像以字节为单位(定义为
imageInMemory
,它是一个UInt8列表)。然后我将字节传递给应用程序

UInt8List imageInMemory    

var argMap = <String, dynamic>{
          "image" : imageInMemory,
        };

    await platform.invokeMethod("passToNative", argMap);
uint8在内存中列出图像
变量argMap={
“图像”:imageInMemory,
};
wait platform.invokeMethod(“passToNative”,argMap);
我该如何从映射中获取参数并将其转换为快速的UIImage呢

提前感谢,,
方法频道中Swift侧的杰克

guard let arguments = call.arguments as? [String:FlutterStandardTypedData],
let data:FlutterStandardTypedData = arguments["image"] else {
    result("Couldn't find image data")
    return
}
let uiImage = UIImage(data: data.data)!
// do something with uiImage