setData method Null safety

Future<void> setData(
  1. ClipboardData data
)

Stores the given clipboard data on the clipboard.

Implementation

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