拍打屏幕快照时出现黑屏

时间:2020-07-05 08:24:56

标签: flutter

我在颤动中使用本机曲面视图,当我使用重绘边界小部件拍摄屏幕截图时。出现黑屏问题。

我的代码:

RenderRepaintBoundary boundary =_globalKey.currentContext.findRenderObject();
ui.Image image = await boundary.toImage(pixelRatio: 3.0);
ByteData byteData =
await image.toByteData(format: ui.ImageByteFormat.png);

请指导我解决问题

0 个答案:

没有答案