write method
Writes the given data to the clipboard asynchronously.
Returns:
- a Future that completes with
null if the write operation was successful,
- a Future that completes with an error if the write operation failed or the clipboard is unsupported.
- a Future that completes with an error if the write operation failed or the clipboard is unsupported.
Implementation
Future<void> write(Iterable<ClipboardItem> data) =>
js_util.promiseToFuture(js_util
.callMethod(this, 'write', <Object?>[data.toList(growable: false)]));