setClipboardData method

  1. @override
Future<bool> setClipboardData(
  1. Map<String, String> params
)
override

Writes the provided text to the clipboard asynchronously.

Parameters:

  • params: Map<String, String> containing the clipboard data.
    • 'plainText': String containing the plain text to write to the clipboard.
    • 'htmlText': String containing the html text to write to the clipboard.

Returns:

  • Future

Implementation

@override
Future<bool> setClipboardData(Map<String, String> params) async {
  final bool? result =
      await methodChannel.invokeMethod<bool>('setClipboardData', params);
  return result ?? false;
}