这是我编写的将接收到的图像添加到内部存储>图片中的代码
print("_onImageSaveButtonPressed");
var response = await http.get(
url,
);
debugPrint(response.statusCode.toString());
var filePath =
await ImagePickerSaver.saveFile(fileData: response.bodyBytes);
print(filePath);
var savedFile = File.fromUri(Uri.file(filePath));
print(doc);
if (response.statusCode.toString() == '200') {
Firestore.instance
.collection('messages')
.document(doc)
.updateData({'isDownloadedImg': true});
}
}```