getData static method

Future<String?> getData()

Implementation

static Future<String?> getData() async {
  var result = await Clipboard.getData(Clipboard.kTextPlain);
  if (result != null) {
    return result.text;
  } else {
    return null;
  }
}