Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/visual-studio-2008/2.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
Image 颤振Web如何将UInt8列表转换为文件_Image_Flutter_Flutter Web_Uint8list - Fatal编程技术网

Image 颤振Web如何将UInt8列表转换为文件

Image 颤振Web如何将UInt8列表转换为文件,image,flutter,flutter-web,uint8list,Image,Flutter,Flutter Web,Uint8list,由于web上不支持dart:io,我在将Uint8List图像转换为Flatter web上的文件时遇到问题,我需要将其转换为文件才能将其上载到FirebaseStorage,是否有解决方法?谢谢你因为dart:io在网络上不可用,你可以使用universal\u io软件包 将其添加到您的pubspec.yaml import 'package:universal_io/io.dart'; File createFileFromBytes(Uint8List bytes) => Fil

由于web上不支持dart:io,我在将Uint8List图像转换为Flatter web上的文件时遇到问题,我需要将其转换为文件才能将其上载到FirebaseStorage,是否有解决方法?谢谢你

因为
dart:io
在网络上不可用,你可以使用
universal\u io
软件包

将其添加到您的
pubspec.yaml

import 'package:universal_io/io.dart';

File createFileFromBytes(Uint8List bytes) => File.fromRawPath(bytes);

飞镖网不支持io吗?是的,你说得对
dart:io
在web上不可用,但您可以使用
universal\u io
软件包。啊,谢谢您,我不知道该软件包存在,在我尝试itOkay后将接受您的回答。这是pub上的软件包: