如何使用flutter on_click按钮获取字节格式的图像,以及如何在任何设备上的图库中存储图像请帮助解决这个问题。
onPressed: () {
isVideo = false;
_onImageButtonPressed(ImageSource.camera);
}
这应该得到字节:
onImageButtonPressed(Future<File> futureFile) {
var file = await futureFile;
var bytes = file.readAsBytesSync();
}