setClipboardData static method

void setClipboardData(
  1. String text
)

设置剪贴板数据 text复制到剪贴板的内容

Implementation

static void setClipboardData(String text) {
  ClipboardData data = new ClipboardData(text: text);
  Clipboard.setData(data);
}