Flutter 复制文本到剪切板、从剪切板读取文本【转】
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);