import 'package:flutter/services.dart';
inside your onTap
add the following:
onTap:(){
Clipboard.setData(new ClipboardData(text: record.name));
Scaffold.of(context).showSnackBar(SnackBar
(content: Text('text copied')));
}
这里的 record.name 就是希望用户点击后复制的东西。
https://stackoverflow.com/questions/55018442/how-to-create-copy-to-clipboard-event-on-flutter
获取剪贴板内容
https://hekaiyou.blog.csdn.net/article/details/93177051