getClipboardData static method

Future<String> getClipboardData()

获取剪贴板数据

Implementation

static Future<String> getClipboardData() async {
  var clipboardData = await Clipboard.getData(Clipboard.kTextPlain);
  if (clipboardData == null) {
    return Future.value("");
  }
  return Future.value(clipboardData.text);
}