我允许用户抓取个人资料图片并将该图片作为文件上传到我的服务器,但是通过ImagePickerWeb
输入图片时出现此错误:
<error>:<getObject: Unexpected error from chrome devtools:>
我不知道这是我的浏览器还是我,但是这是我正在尝试的方法:
Future<void> getMultipleImageInfos() async {
var imageFile =
await ImagePickerWeb.getImage(outputType: ImageType.file);
print(imageFile);
if (imageFile != null) {
setState(() {
currentSelfie = imageFile;
_accDetails['customer_selfie'] = currentSelfie;
});
}
}
然后在此处显示该照片:
Image.file(
currentSelfie,
height: screenAwareSize(100, context),
width: screenAwareSize(100, context),
fit: BoxFit.fill,
)