getClipboardData method

  1. @override
Future<Map<String, String>?> getClipboardData()
override

get clipboard data from the clipboard asynchronously.

Returns:

  • Future<Map<String, String>?>: a Map containing the clipboard data.
    • 'plainText': String containing the plain text from the clipboard.
    • 'htmlText': String containing the html text from the clipboard.

Implementation

@override
Future<Map<String, String>?> getClipboardData() async {
  final Map<String, String>? text = await methodChannel.invokeMapMethod<String, String>('getClipboardData');
  return text;
}