Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows系统下无法读取剪贴板里的数据 #40

Open
raistlinqjx opened this issue Oct 22, 2024 · 1 comment
Open

Windows系统下无法读取剪贴板里的数据 #40

raistlinqjx opened this issue Oct 22, 2024 · 1 comment

Comments

@raistlinqjx
Copy link

Windows系统下,使用capture()方法截图后,使用readImageFromClipboard()方法读取剪贴板数据为空,尝试使用Pasteboard和Clipboard等其它组件,读取数据为空。但使用系统快捷键可以粘贴出截取的图片。
此情况出现在用户设备上,开发机上不出现。

@raistlinqjx
Copy link
Author

代码如下
await ScreenCapturer.instance.capture( mode: CaptureMode.region, imagePath: file.path, copyToClipboard: true, ).then((_capturedData) async { Uint8List? imagedata = await ScreenCapturer.instance.readImageFromClipboard(); if (imagedata != null) { // } else { } }

结果为空,且imagePath指定的位置里没有图片

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant