1.导入包
import 'package:flutter/services.dart';
2.复制文本到剪切板
Clipboard.setData(ClipboardData(text: '复制到剪切板'));
3.从剪切板读取文本
var text = Clipboard.getData(Clipboard.kTextPlain);
import 'package:flutter/services.dart';
Clipboard.setData(ClipboardData(text: '复制到剪切板'));
var text = Clipboard.getData(Clipboard.kTextPlain);
本文标题:Flutter 复制文本到剪切板、从剪切板读取文本
本文链接:https://www.haomeiwen.com/subject/cmealctx.html
网友评论