setData method

Future<void> setData (ClipboardData data)

Stores the given clipboard data on the clipboard.

Implementation

static Future<void> setData(ClipboardData data) async {
  await SystemChannels.platform.invokeMethod(
    'Clipboard.setData',
    <String, dynamic>{
      'text': data.text,
    },
  );
}