Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
4.3k views
in Technique[技术] by (71.8m points)

为什么 flutter web 程序, 用户点击copy按钮, copy的内容会存在于服务器的剪切板,而不是客户端的剪切板?

各位有没有用flutter web碰到过这样的问题:

代码里用到了复制功能,

ClipboardData data = new ClipboardData(text: 'test content');
Clipboard.setData(data);
ToastHelper.showToast(context, "已复制到剪切板");

但是用户通过浏览器访问服务器后,这个复制的内容test content, 是复制在我服务器的剪切板里面,而不是在用户端的剪切板里面…怎么样才能弄到用户端的剪切板里去?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

chrome兼容性问题.
客户端电脑升级到最新版本chrome即解决.??


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...