Retrieves data from the clipboard that matches the given format.
format
is a media type, such astext/plain
.
Source
static Future<ClipboardData> getData(String format) async { Map<String, dynamic> result = await PlatformMessages.invokeMethod( _kChannelName, 'Clipboard.getData', <String>[format]); if (result == null) return null; return new ClipboardData(text: result['text']); }