我想把从arSessionManager.snapshot()
收到的ImageProvider<Object>
个文件保存到我的图库中.
然而,ImageGallerySaver.saveImage()
只能使用Uint8List
图像.
我该怎么办?
这是我的密码.
Future<void> onTakeScreenshot() async {
ImageProvider<Object> capture = await arSessionManager.snapshot();
await showDialog(
context: context,
builder: (_) => Dialog(
child: Container(
decoration: BoxDecoration(
image: DecorationImage(image: capture, fit: BoxFit.cover)),
),
),
);
await ImageGallerySaver.saveImage(capture); // the problematic part
}